Sending event markers from Inquisit script to Acqknowledge via serial port


Sending event markers from Inquisit script to Acqknowledge via serial...
Author
Message
ejn528
ejn528
Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)Associate Member (61 reputation)
Group: Forum Members
Posts: 5, Visits: 19
I am trying to send TTL signals to Acqknowledge via serial port. I am using The Black Box ToolKit USB TTL Module v1.

When I send signals using the proprietary Black Box software Acqknowledge receives them immediately and as expected. When using the serial port monitor in Inquisit however, the sending is inconsistent, sometimes requiring me to click 'send' twice or more in order to actually send the signal, but most of the time it doesn't work at all. It consistently isn't working via the script.

Also interesting to note, when Inquisit does send the signal, it does not align with the expected lines i.e. sending '00000001' should turn on line 1 (which it does via the Black Box ToolKit Interface), but instead it turns on lines 1, 3, and 4.
The expected binary to elicit this behavior is '00001101'

Additionally, sending '00000100' works much more consistently in Inquisit, but again requires clicking send at least twice (but sometimes more) and turns on lines that aren't expected. This should turn on line 3 only, but instead turns on lines 1, 3, 4, 5, 7, and 8. The expected binary to produce this behavior is '11011101'

The inconsistent behavior is the most confusing part of this to me, as I can't create a heuristic in order to troubleshoot. I am hoping the information I provided will ring a bell for someone who has used USB serial port hardware before. I am happy to provide some more information as needed, but this is a comprehensive description of what I have been experiencing.

Thanks!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 101K
ejn528 - 5/21/2024
I am trying to send TTL signals to Acqknowledge via serial port. I am using The Black Box ToolKit USB TTL Module v1.

When I send signals using the proprietary Black Box software Acqknowledge receives them immediately and as expected. When using the serial port monitor in Inquisit however, the sending is inconsistent, sometimes requiring me to click 'send' twice or more in order to actually send the signal, but most of the time it doesn't work at all. It consistently isn't working via the script.

Also interesting to note, when Inquisit does send the signal, it does not align with the expected lines i.e. sending '00000001' should turn on line 1 (which it does via the Black Box ToolKit Interface), but instead it turns on lines 1, 3, and 4.
The expected binary to elicit this behavior is '00001101'

Additionally, sending '00000100' works much more consistently in Inquisit, but again requires clicking send at least twice (but sometimes more) and turns on lines that aren't expected. This should turn on line 3 only, but instead turns on lines 1, 3, 4, 5, 7, and 8. The expected binary to produce this behavior is '11011101'

The inconsistent behavior is the most confusing part of this to me, as I can't create a heuristic in order to troubleshoot. I am hoping the information I provided will ring a bell for someone who has used USB serial port hardware before. I am happy to provide some more information as needed, but this is a comprehensive description of what I have been experiencing.

Thanks!


The "Send Byte" field in the serial port monitor expects decimal values, i.e. 0 to 255 (corresponding to 00000000 to 11111111 in binary). So, entering a value 4 (decimal) would correspond to the binary value of 00000100, or 0x04 in hexadecimal.

I am unable to reproduce the other behavior. Hitting send once is sufficient and the value received at the other end is the one entered and expected.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 101K
Dave - 5/21/2024
ejn528 - 5/21/2024
I am trying to send TTL signals to Acqknowledge via serial port. I am using The Black Box ToolKit USB TTL Module v1.

When I send signals using the proprietary Black Box software Acqknowledge receives them immediately and as expected. When using the serial port monitor in Inquisit however, the sending is inconsistent, sometimes requiring me to click 'send' twice or more in order to actually send the signal, but most of the time it doesn't work at all. It consistently isn't working via the script.

Also interesting to note, when Inquisit does send the signal, it does not align with the expected lines i.e. sending '00000001' should turn on line 1 (which it does via the Black Box ToolKit Interface), but instead it turns on lines 1, 3, and 4.
The expected binary to elicit this behavior is '00001101'

Additionally, sending '00000100' works much more consistently in Inquisit, but again requires clicking send at least twice (but sometimes more) and turns on lines that aren't expected. This should turn on line 3 only, but instead turns on lines 1, 3, 4, 5, 7, and 8. The expected binary to produce this behavior is '11011101'

The inconsistent behavior is the most confusing part of this to me, as I can't create a heuristic in order to troubleshoot. I am hoping the information I provided will ring a bell for someone who has used USB serial port hardware before. I am happy to provide some more information as needed, but this is a comprehensive description of what I have been experiencing.

Thanks!


The "Send Byte" field in the serial port monitor expects decimal values, i.e. 0 to 255 (corresponding to 00000000 to 11111111 in binary). So, entering a value 4 (decimal) would correspond to the binary value of 00000100, or 0x04 in hexadecimal.

I am unable to reproduce the other behavior. Hitting send once is sufficient and the value received at the other end is the one entered and expected.

One more thing:

I don't know about that specific version of the BBTK USB-to-serial module, but if memory serves, those modules expect two-byte ASCII commands. The module's manual should have the details. Inquisit doesn't support sending ASCII text over serial. What you can try is converting to the numerical ASCII codes and then sending two-byte sequences for initialization, line-setting, and reset accordingly.

<block example>
/ trials = [1=init; 2-10=test_lines; 11=reset]
</block>

// initialize the module by sending the two init bytes ("RR" or 82 and 82 as decimal ASCII codes)
<trial init>
/ stimulusframes = [1=init_byte1; 2=init_byte2]
/ validresponse = (0)
/ trialduration = 50
</trial>

<trial test_lines>
/ stimulusframes = [1=on_byte1; 2=on_byte2; 21=off_byte1; 22=off_byte2]
/ validresponse = (0)
/ trialduration = 500
</trial>

<trial reset>
/ stimulusframes = [1=init_byte1; 2=init_byte2]
/ validresponse = (0)
/ trialduration = 50
</trial>

// send "01", "02", "03", "04", "05", "06", "07", "08", and "FF"
// to turn on lines 1 to 8 successively and finally all eight lines at once ("FF")
<port on_byte1>
/ items = (48, 48, 48, 48, 48, 48, 48, 48, 70) // ASCII codes for digit "0" (48) and character "F" (70)
/ select = sequence
/ erase = false
/ port = com3
</port>

<port on_byte2>
/ items = (49, 50, 51, 52, 53, 54, 55, 56, 70) // ASCII codes for digits "1" (49) to "8" (56) and character "F" (70)
/ select = port.on_byte1.currentindex
/ erase = false
/ port = com3
</port>

<port init_byte1>
/ items = (82) // ASCII code for character "R"
/ erase = false
/ port = com3
</port>

<port init_byte2>
/ items = (82) // ASCII code for character "R"
/ erase = false
/ port = com3
</port>

// send "00" to turn off lines
<port off_byte1>
/ items = (48) // ASCII code for digit "0"
/ erase = false
/ port = com3
</port>

<port off_byte2>
/ items = (48) // ASCII code for digit "0"
/ erase = false
/ port = com3
</port>


If that doesn't work, the module and Inquisit simply aren't compatible.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search