02-06-2019 06:47 AM
You didn't wire the purple VISA reference wire through the False case of your first case structure.
Right click that tunnel and uncheck "Use Default if Unwired". I can tell because there is a hollow tunnel there. Then change to the False case and wire it through, that way the VISA read gets the valid reference rather than a default empty reference. That is why you are getting that invalid reference error.
02-06-2019 07:56 AM
I am concerned about how you are reading the data. You are just reading 83 bytes. Could the message be longer? Is there a termination character? Generally, instruments that send ASCII data will end the message with a Carriage Return (CR, 0xD) and/or a Line Feed (LF, 0xA). If it does, then you should be trying to read more data than a message will contain and let the VISA Read return when the termination character is read. This is by far the best way to make sure you have a full message.
You don't need the wait before the VISA Read. The VISA Read will handle the waiting for you while waiting for the number of bytes you asked for or a termination character is read.
And since it is not clear, what mode do you actually want to run in? If it were me, I would use the User Timed setup and then you don't have to worry at all about asking for the data (the VISA Read) and you just have a loop that reads the data. You could actually get rid of all of your waits in the loop in this setup as well.
02-06-2019 10:48 PM
Thanks for your help!
02-06-2019 11:10 PM
Could the message be longer? Is there a termination character?
Well, this site shows me the numbers of bytes when all channels are read. It is 83 bytes. Terminational character is comma.:
07.02.19,05:52:14,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,0000
And since it is not clear, what mode do you actually want to run in?
We (my leader and I) want to run it in User mode -> timed. But first, we want to make sure it works as described in datasheet.
We are going to contact the distributor for further help.
Thanks for your help as well.
Kind regards,
Balázs
02-07-2019 06:06 AM
@LTBALAZS wrote:
Could the message be longer? Is there a termination character?
Well, this site shows me the numbers of bytes when all channels are read. It is 83 bytes. Terminational character is comma.:
07.02.19,05:52:14,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,000.0 ppm,0000
1. That is a bad link.
2. The comma is a Delimiter (data separator), not a termination character.
3. Did you try to read more bytes? Are you sure you did not miss some non-printable character when you calculated the 83?
Where is the actual manual for this device? I was only able to find the data sheet, which did not include any of the serial communications.