10-13-2015 01:51 AM
Hi,
I need to read 8 voltages from an microcontroller DaQ system via RS232 protocol. I made an Vi which I read data from DaQ system, and I use scan from string to match each value of voltage. My vi only work if the delay in the case loop where is the scan from string function is more than 1000 ms, also when is small, like 100 ms, I get an error like the one attached. How can I solve this? I need to use this delay of 100 ms, because after I want to print this values in a ascii file. I hope you understand my problem and you will provide me a solution.
Thank you and best regards
Solved! Go to Solution.
10-13-2015 02:07 AM
I can't open your file (sitting with LV2011 currently), but it sounds like you're not using End of read-character and/or read a set number of characters, which typically gives problems similar to this.
Set up your RS232 to use End of read-character and set Visa Read to a large enough number to read the full message (i usually set 100 chars even if the message is 20 chars).
How does the read information look like, set a Read buffer indicator to \\-mode so you can see if you have some dirt characters making it hard to interpret.
/Y
10-13-2015 02:14 AM - edited 10-13-2015 02:23 AM
Hello, Yes I don't have a number of chars to be read in visa read block, I\ve used a property node. I have attached the VI for LabVIEW 2011.
Later edit: and this is my data from DaQ system: "Z1.031\r\n\n0.025\r\n\n1.521\r\n\n0.000\r\n\n1.792\r\n\n0.030\r\n\n3.308\r\n\n0.118\r\n\n"
10-13-2015 02:30 AM
Change the interpretation to use a String to Array, and don't forget to remove the 1st 'Z'. See attachment.
/Y
10-14-2015 04:44 AM
Hi, i solve the problem with a constant in VISA read block for number of bits. Thank you.