PDA

View Full Version : sending event markers to a monitoring computer


mikestatic
01-03-2006, 08:05 AM
I am setting up a program that will display a slideshow of pictures in the virtual environment and I will be using a second computer to monitor physiological responses to each slide. My problem is that I need to send an event marker to the monitoring computer each time a new slide is revealed in the virtual environment and I am unsure of exactly how to accomplish this automatically. Each slideshow picture will be manually triggered, so it will not be as simple as just setting a timer to gauge the events. Any ideas would be helpful. Please let me know if further information is needed.

farshizzo
01-03-2006, 10:34 AM
Hi,

When the next slide is triggered, simply send a network message to the monitoring computer. Here is how to create a network object to send data through:network = viz.add(viz.NETWORK,'MonitorComputerName')Here is how you would send data to that computer:network.send(1) #Slide 1 is being displayedThen on the monitoring computer you would add the following code:def onnetwork(message):
print 'Slide',message[2],'is being displayed'

viz.callback(viz.NETWORK_EVENT,onnetwork)Let me know if anything is unclear.

mikestatic
01-25-2006, 09:35 AM
My plans have changed. Instead of sending an event marker to a different computer, I need to send an event marker directly to our physiological monitoring system in the form of a voltage spike via the serial port of my computer running Vizard. I am assuming that this would be a command different from the network command. Any insight on how to send a fixed voltage marker from Vizard via the serial port would be much appreciated.

tobin
01-26-2006, 09:23 AM
Look at this thread, starting at post #9:

http://www.worldviz.com/forum/showthread.php?t=302

Once you get pySerial working, you can use it to set the RING indicator on your serial line.