Sending TTL signal from one computer to another
Sending TTL signal from one computer to another
[edited from support email]
I am running DirectRT on two computers and I am trying to synchronize them by having one wait for a TTL signal from the other. The receiving machine waits for a "1" to be received but it locks up. I manage to see an error message on the screen which is attached. The message is reporting problems with something called NT Port Library (see attached image of the error: "Can't find valid registration information..."). Do you provide that library with your application or use it in any part of the program?
Yes, NTPort Library is normally installed during the regular DirectRT installation. It's a utility that DirectRT uses to help it communicate with external programs and hardware via TTL signals. Sounds like there is a problem with the licence for some reason. To make sure I'm clear--is it only the *receiving* machine that is locking up like this?
In any case, is it safe to assume you have fairly new versions of DirectRT installed on these machines? e.g., v2006 or later. If so, the quickest way to problem solve this would be to run the IOTest utility on the Tools menu in DirectRT on both machines. You can use this as a means of testing the signals going back and forth without DirectRT having to be in a session.
Start the utility and then choose the sending port on the sending machine and the receiving port on the receiving machine and then try to send a value from one machine to the other, e.g., "1" for 1000ms. See if the receiving machine can detect it. If you still get the same error let me know. This ought to be a more efficient way to problem solve since the IOTest utility uses the same code to deal with TTL signals as DirectRT.
If the problem persists, try logging on as an administrator (if you are not already doing so). That may help if it is a permissions issue.
See also: www.empirisoft.com/directrt/help/directrt_samples_of13_ttl_signals.htm
Please let me know if you have any questions.
(Paraphrased from the DirectRT Manual:)
For DirectRT's TTL receive routines to work *at all* in an experiment, you first need to transmit a byte of data from that same machine. It is okay nothing is connected to the computer to receive this data.
Without that first transmission, the receive routines won't work properly.
If you're able to send and receive data using the IOTest utility, we know
that the cable is good between the machines.
So, at the very beginning of the experiment file on your receiving computer,
insert the following lines:
stim | loc | time
ttl:1 | 888 | 1000
This will send a 1 second pulse and properly initialize the receiving
computer.
Then, you can continue using the experiment you've written.