01-20-2016 09:18 PM
I am able to successfully communicate with the device, however, the output reads the default value everyother time. The VISA Read function reads the command everyother time instead of the value. When ran consecutively eventually the VI stops running and LabVIEW must be restart in order for the VI to communicate again. What is the cause of this? How can I fix it? Attached are two VI's that display this problem when ran. Thank you.
01-21-2016 01:45 AM
Hi,
I think you should start by having a look at the examples for serial communication. There you can see the basics of how it should be.
You don't open the COM port. There is no time in between the write and read. You don't know if there are 64 bytes to read.
AND you should not run a VI continuously.
Kees
01-21-2016 04:13 AM
Where is the serial port initialized? Where is it closed? What instrument are you trying to communicate with? Where is your main loop?
01-28-2016 12:31 PM
I have looked at many examples and have followed the wire diagrams provided as trusted examples. I am still very much a novice, this is clear, however I have tried adding time between read and write, and with the visa open and close function. What do you mean by open the com port. My current iteration is unable to even communicate with the devise, which is a viscolab 4000. By continuously running the VI I want to be able to call upon this function every time the master program calls upon it. Attached is my modification to the previous VI.
01-28-2016 02:15 PM
You need to configure the serial port. Search for Configure Serial Port.vi. From there, you need to figure out all of the RS-232 settings: baud rate, number of data bits, parity, number of start bits, number of stop bits, etc. I recommend giving Viscolab a call to get the settings.