01-30-2015 06:23 AM
In my project i have 2 task
(1).Read data of sensor (attached to arduino board) serially and display on LabVIEW.
(2).Control output(just ON-OFF) pins of arduino using LabVIEW.
So,for that i am using TAB in labview.created 2 TAB called Oscillospe and Input.
If i first start Oscilloscope it work well.
But when i come to Oscilloscope tab after using Input tab.
It gives Time out error (VISA read)
If i am executing in Highlight mode it works well
01-30-2015 06:47 AM
Hi,
You have the termination character disabled. If your Arduino program always sends 3 characters it could work but you have to wait till those 3 characters are available at the serial port. Now you write something to the Arduino and read 3 characters directly after the write.
Use the property node 'Bytes at serial port' and wait till there are 3 bytes available.
Kees
01-30-2015 06:49 AM
Why not have the arduino constantly sending the readings back to you? So you would want to have a loop that just reads the data and then another loop to write the switch positions. It would make this code A LOT simpler. You wouldn't need to worry about your tabs at all and you can use an Event Structure so that you only send the switch positions when there is a change. And then you only need to send that change.
Also, you really should have the termination character turned on. When you do this, set the VISA Read to read more bytes than you would expect in the message. The read will stop when it finds the termination character, which is an End Of Line.
01-30-2015 09:36 AM
Hi
The termination character and Arduino have a problem somewhere.
I really tried hard and you know I try not to give up.
But I still use an end character but don't let VISA handle it anymore because this combination crashes windows in a few hours.
And this a several pc's and OS's, in a build and in the environment.
I did send in a CAR more than a year ago but have to admit I stopped asking a few months ago.
01-30-2015 10:56 AM
In my VI once i change to tab Oscilloscope it send char to arduino and arduino start to send data .Even though time out error is coming .If i run VI in highlight mode it read data sucessfully.I also tried for Terminate char but it doesn't make any sense ..
I also check out this using hyper terminal means Arduino code is OK
01-30-2015 11:35 PM
I tried using termination character but still persisting same problem..ViSA read shows 0 byte at port even though arduino is sending data continuosly
01-31-2015 12:58 AM
I also analyzed that......Once i am using Oscilloscpe Tab for read sensor data itwork well then if i put my Input TAB empty (Means nothing inside this loop -No VISA write operation)and if i switch back to again Oscilloscope TAB it work well..............................Is there any issue with Input TAB(i mean VISA writing effect upcoming read operation)????????????????????
02-02-2015 04:52 AM
02-02-2015 05:29 AM
02-02-2015 05:57 AM
In this VI if i make INPUT case empty then Oscilloscope case working well....So it may be possible something wrong in INPUT case..But i am confused ...