10-11-2011 10:16 AM - edited 10-11-2011 10:16 AM
If I run my program, the command is sent to the rs232 device to start transmitting data. But when I get to the VISA read block it just stalls and does not output anything into the indicator. I have attached the program and the communications data sheet for my device. I think i have it set up correctly i am just confused about what to do for sampling the data to make the read function work.
Solved! Go to Solution.
10-11-2011 10:43 AM
Take a look at the help for VISA read to understand the three different end modes
Use a VISA property node to set End mode for reads to TermChar and the Termchar to 0x0D (<cr>) and read 64 characters. the read will return everything it gets when it sees the <CR>.
If this stupid Laptop ever installs flash I'll post a snippet
10-11-2011 10:46 AM
Hello,
Try to see some example code in labview. Just type "Basic serial read and write " in labview examples and look at that once.
Or, you are currently reading data continuously from your device and your code is not at all finished. You need to close the port when the data read is finished or some error occurred. Drag the write visa into while loop and give some delay time between write visa and read visa.
Hope this help you.
10-11-2011 10:51 AM
i dragged the write into the while loop and gave it a delay with using a falt sequence structure but had not luck.
10-11-2011 10:54 AM
I did not see your data sheet. May be you need to write termination CR to your device. Go to programs--> strings---> look for linefeed or carriage return and add then concatenate them to your existing one command.
10-11-2011 11:00 AM
Check this example and write your command at write visa and run the program as usual. Don't change anything except your command.
10-11-2011 11:04 AM - edited 10-11-2011 11:08 AM
I dont quite understand what you are referring to. Something like this?
10-11-2011 11:07 AM
Have you tried to use HyperTerminal or something like it to test out your hardware manully?
I bet you have to send a "return" after the "TS" to get the OX400 to start sending feed back data.
10-11-2011 11:08 AM
I don't know how many bytes your device will send when it receives your TS command. Try again sending only TS to your device from my previous code.
10-11-2011 11:09 AM
I sent it just TS but got back 0 when the program is running.