LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial read not giving an output?

Solved!
Go to solution

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. 

Download All
0 Kudos
Message 1 of 41
(3,841 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 41
(3,831 Views)

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.

0 Kudos
Message 3 of 41
(3,828 Views)

i dragged the write into the while loop and gave it a delay with using a falt sequence structure but had not luck. 

0 Kudos
Message 4 of 41
(3,821 Views)

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.

0 Kudos
Message 5 of 41
(3,816 Views)

Check this example and write your command at write visa and run the program as usual. Don't change anything except your command.

0 Kudos
Message 6 of 41
(3,808 Views)

I dont quite understand what you are referring to. Something like this? 

0 Kudos
Message 7 of 41
(3,804 Views)

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.

 

 

Omar
0 Kudos
Message 8 of 41
(3,798 Views)

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.

0 Kudos
Message 9 of 41
(3,797 Views)

I sent it just TS but got back 0 when the program is running. 

0 Kudos
Message 10 of 41
(3,795 Views)