05-16-2011 10:49 PM - edited 05-16-2011 10:52 PM
I am trying to communicate to a Stanford Research Systems SR 245 digital analog convertor via LabVIEW. In MAX I can write commands to the device and read from the device, and everything is working fine. In LabVIEW the device is never written to; the "bytes at port" is always zero.
I am connecting to the device via a DB9 to DB25 cable. I don't fully understand how this works; is there any way this could be causing the problem or does the fact that the commands work in MAX imply that it is simply a problem with my VI?
I have an indicator on the "return count" terminal of the "serial write" VI which says that there have been 2 bytes transferred (or other value), but as I said, immediately following this in the data flow, the port contains zero bytes. If I exit the program and open MAX, the instrument does not exhibit the state I would expect had the write-command actually registered (although I'm not positive that I can conclude anything from that).
Thanks very much for any suggestions.
05-17-2011 07:36 AM
Something is wrong with your VI. Perhaps you are not sending a termination character. Do you have '\' Code Display turned on?
05-17-2011 07:49 AM
Also, unless I'm mistaken, "bytes at port" refers to incoming data
05-17-2011 01:20 PM
n00b mistake. Thank you! And yeah I was wrong about bytes at port as well.