Serial port output - Syntax example


Author
Message
SMSchulz
SMSchulz
Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)Associate Member (184 reputation)
Group: Forum Members
Posts: 1, Visits: 1
Hi,
we need to send a simple "on" signal through COM3 (actual hardware is: USB-to-COM-Adapter connected to USB port as a COM device) for lets say 10msec, then go back to zero. We'd like to associate this as a marker signal with e.g. presenation of a word or a picture, and send it to our physiology recording device which is designed to read a COM-port and translates this into a number in a marker channel we record concurrently to he actual physiology signals.
I struggle a bit with setting up the syntax...

<port portname>
/ erase = true("bits") or true(integer) or false
/ items = itemname or ("binary", "binary", "binary",... ) or (integer, integer, integer,... )
/ onprepare = [expression; expression; expression; ...]
/ port = port name
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ subport = porttype
</port>

Could someone point me to a reference on what all the options actually do?
Even better: coudl someone provide an example for a serial port? The parallel port is reported in the Inquisit documentation - but it seems that it is the simpler example...

Any help is greatly appreciated!
Kind regards,
Stefan





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: 12K, Visits: 98K
SMSchulz - Wednesday, March 29, 2017
Hi,
we need to send a simple "on" signal through COM3 (actual hardware is: USB-to-COM-Adapter connected to USB port as a COM device) for lets say 10msec, then go back to zero. We'd like to associate this as a marker signal with e.g. presenation of a word or a picture, and send it to our physiology recording device which is designed to read a COM-port and translates this into a number in a marker channel we record concurrently to he actual physiology signals.
I struggle a bit with setting up the syntax...

<port portname>
/ erase = true("bits") or true(integer) or false
/ items = itemname or ("binary", "binary", "binary",... ) or (integer, integer, integer,... )
/ onprepare = [expression; expression; expression; ...]
/ port = port name
/ resetinterval = integer
/ select = integer or selectionmode or selectionmode(pool) or dependency(stimulusname) or dependency(listname) or listname
/ subport = porttype
</port>

Could someone point me to a reference on what all the options actually do?
Even better: coudl someone provide an example for a serial port? The parallel port is reported in the Inquisit documentation - but it seems that it is the simpler example...

Any help is greatly appreciated!
Kind regards,
Stefan





A <port> element works like any other stimulus. What you do is something like:

// sends 1
<port on>
/ items = ("00000001")
/ port = COM3
</port>

// back to 0
<port backtolow>
/ items = ("00000000")
/ port = COM3
</port>

<text word>
/ items = ("A", "B", C")
...
</text>

with 

<trial example>
/ stimulustimes = [0=word, on; 20=backtolow]
...
</trial>

You can also directly specify the integer value to wish to send instead of specifying the value in 8-bit binary:

// sends 1
<port on>
/ items = (1)
/ port = COM3
</port>
Edited 7 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search