Trigger code oddities

Post Reply
nhag
Posts: 4
Joined: Sat Jan 12, 2019 8:50 pm

Trigger code oddities

Post by nhag » Sat Jan 12, 2019 9:01 pm

Hello,

I have added trigger codes in my experimental task, which is running on PsychoPy software. They generally appear as expected in ActiView, but sometimes appear with a different code and the correct code written below it, but nearly illegible (i.e., written over top of other numbers). An example of this is attached, where 254 is the correct trigger code. Other times, the correct code is written over top of another number.

Do you know what could be causing this?

-Nathan
Attachments
Trigger code overlap.PNG
Trigger code overlap.PNG (1.66 KiB) Viewed 1568 times

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

Re: Trigger code oddities

Post by Coen » Mon Jan 14, 2019 3:09 pm

Instead of 0 --> 255 -->0 , your code probably generates 0 --->255 ---> 254 ---> 0

0 = 00000000
254 = 11111110
255 = 11111111

The 8 bits do not return to 0 simultaneously.

Solution: toggle only one bit per trigger event, see viewtopic.php?f=7&t=1022

In general: always use the "analog" trigger display mode to analyze trigger problems. In "analog" mode, each bit bit is shown separately as a colored dot/bar.

Best regards, Coen (BioSemi)

nhag
Posts: 4
Joined: Sat Jan 12, 2019 8:50 pm

Re: Trigger code oddities

Post by nhag » Fri Jan 18, 2019 9:25 pm

Thank you Coen. I have been playing with different trigger codes in "analog" using Putty and wasn't able to find one that toggled one bit. As far as I can tell, I can only test single key stokes in Putty though. Looking at the post that you recommended, I realized that it was about parallel ports and I am using a serial port. We are actually using the Biosemi USB Trigger Interface, and I was wondering if you know what values (i.e., key strokes) could be used to generate triggers that only toggle one bit?

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

Re: Trigger code oddities

Post by Coen » Sat Jan 19, 2019 10:26 am

Values are listed in the post link given above. Return to 0 after each trigger.

Bets regards, Coen (BioSemi)

nhag
Posts: 4
Joined: Sat Jan 12, 2019 8:50 pm

Re: Trigger code oddities

Post by nhag » Sat Jan 19, 2019 4:35 pm

Thank you! I saw those, but thought they are different for a serial port (compared to the parallel port used in that post). So I will use 1, 2, 4, 8, 16, 32, 64, and 128.

In that post, you said lines 9-16 do not cause false triggers and recommended using all 16 trigger lines because the user needed more than 8 triggers. I'm in the same situation. How would I be able to use all 16 trigger lines?

Thank you.

nhag
Posts: 4
Joined: Sat Jan 12, 2019 8:50 pm

Re: Trigger code oddities

Post by nhag » Sat Jan 19, 2019 6:27 pm

Update: Using the above triggers, I still see overlap when using 16. 16 usually sends a trigger code of 243, but occasionally (every 10 triggers or so) it looks like the attached image. I can't tell what is overlapping, but the other triggers in the task are appearing as 49, 50, 52, 56 (using code values of 1, 2, 4, and 8, respectively).

Any ideas about what that means?
Attachments
Trigger code overlap_2.PNG
Trigger code overlap_2.PNG (886 Bytes) Viewed 1514 times

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

Re: Trigger code oddities

Post by Coen » Tue Jan 22, 2019 4:07 pm

As instructed above, use "analog" trigger display mode to see which bits (besides LSB for 0 -->1) are switching.

Best regards, Coen (BioSemi)

Post Reply