Trigger cannot be captured using function keys

Post Reply
bioschau
Posts: 2
Joined: Thu May 05, 2016 12:33 am

Trigger cannot be captured using function keys

Post by bioschau »

Hi,
I'm using LabVIEW API to do my own data acquisition for EOG data. The speedmode is set to 4. As I understand it, I should be getting 282 packets x 4 bytes, per sweep. Ignoring the actual EOG data, channel 0 is the sync word, and channel 1 is the status/trigger. Here are a few samples of the captured data:

-256, -1727987968
-256, -1727987968
-256, -1727987968
-256, -1727987968
-256, -1727987968
-256, -1727987968

-256 == 0xff ff ff 00, which is the sync word
-1727987968 == (binary) 10011001 00000000 11111111 00000000, which is the status / trigger word

If I interpret this correctly, I should ignore the last byte of 0's as it is inserted by the AD converter. So the MSBit = 1, means I have a MK2, bits 19-17 = 100, means speed mode 4.

I was hitting the function keys F1 to F8 repeated during the collection, so I was expecting bits 15 to 8 taking turns becoming 1's instead of always 0's.

I've verified that the ActiveView software can capture the F1-F8 correctly. Do I need to do something different to read the triggers using the LabVIEW API? Please advise.

Thanks and regards,
--Bill

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Trigger cannot be captured using function keys

Post by Coen »

The USB-receiver transfers data to the ringbuffer. ActiView reads the ringbufffer, inserts the triggers from the function keys into the data, and streams the data to screen and file.

Apparently, you are reading directly from the ringbuffer. The function keys do not write into the ringbuffer. Therefore you do not see the function key triggers in your data.

You should insert the function key triggers in the data read from the ringbuffer (use ActiView source code as an example).

Best regards, Coen (BioSemi)

bioschau
Posts: 2
Joined: Thu May 05, 2016 12:33 am

Re: Trigger cannot be captured using function keys

Post by bioschau »

Thanks for your response. I'm reading directly from the ringbuffer, and was under the impression that the merging of the trigger into the signal was done by the USB2 Receiver box.

To clarify, I'm using the labview_dll C++ APIs. From the header file, I see a USB_WRITE() and WRITE_SINGLE_SWEEP(). Neither one of these APIs seems appropriate for merging the trigger with the EEG/EOG signal stream. Do you have an example showing how this is done? I don't see the ActiView source code.

Thanks,
--Bill

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Trigger cannot be captured using function keys

Post by Coen »

Just read the data form the ringbuffer and overwrite the appropriate trigger bits with input from the function keys.

Best regards, Coen (BioSemi)

Post Reply