01-20-2018 07:47 AM - edited 01-20-2018 07:48 AM
Gryffin wrote:
The device sends an update every 10 seconds, I used a timed loop with a case structure so that it calls the Read vi every 11 loops (11 seconds, 1 extra second just to be safe), also, I have the timed loop set to 1 second so that it updates the counter gauge every seconds indicating how much longer until the next measurement.
Let me suggest a better alternative. I would put this in my Intermittent Data arena. So use the Bytes At Port to determine if any data has at least started to come in. If there is data (bytes >0), read the message. If there is no data (bytes =0), wait. I tend to use 50ms. I would not go much higher than 100ms or else your code will start to feel sluggish (slow response to pressing the stop button in this case). Do NOT use the Bytes At Port to determine how may bytes to read, just to determine if there is data to read.
And as RavensFan already stated, do make sure you close your serial port when you are done with it.
Note: The case you cannot see is "0" and it just has a 50ms wait in it with the VISA and error wires being passed through.
01-22-2018 10:30 AM - edited 01-22-2018 10:32 AM
Just curious, is it an Omega GAB-1700? Looks like this:
If so, it's a rebranded Servomex 5200 series:
I have a driver written for the Servomex (which supports the dual-channel option as well), PM if you want to try it.
Best regards,
Dave