LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zero value readings every 30 minutes from watlow F4 via RS232

Hi Community,

 

I've been working on a watlow monitoring program for a chamber.

 

My labview program seems to be working fairly consistently except i'm running into a major problem every 30 or so minutes with the watflow drivers read.vi when i ask it to send me the temperature on analog input 1. 

 

The program simply uses the watlow f4 drivers for labview to take a reading of the thermocouple on the watlows analog input1 slot. 

Its working fine, but for some unknown reason, every 30mins or so, it retrieves a 0 degree reading

I configure the rs232 serial port with the baud rate on the watlow (19200). I know its working because its actually pulling the correct values 99% of the time, but I can't figure out why its reading 0 C every now and then.

I do have a 3s wait in my while loop because I don't want to overload the temp plot with a ton of values (and the PC i'm running this program on is just...slow and old)

 

is there something I should be configuring differently on the serial ports? i use the visa configure serial.vi and everythings left as default other than the baud rate and source..

 

any help would be appreciated

 

 

0 Kudos
Message 1 of 5
(2,594 Views)

Hard to tell from a picture but chances are you are missing a responce (timeout or other comm error) and the vi is returning the default value (0) 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(2,571 Views)

sorry about the messy picture..( i need some serious work on block diagram layout prettiness lol)

 

i'll look for that timeout, that would make sense. 

0 Kudos
Message 3 of 5
(2,557 Views)

You don't do anything with your error wires.  If the driver returns an error when this happens, you could put the "get temp" call in a while loop and if no error is returned, the loop exits and you write the data to file as normal.  If error is returned, the loop repeats and tries to get temperature again. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 5
(2,541 Views)

Yup my suggestion is to look into proper error handling.  The simpliest thing I'd try if I were you is to stop the while loop on an error, so you can see what the error is.  Or put a probe on the error wire (comeint out of the subVI) and pause if there is an error then see what it is.  To stop the loop on error, replace the OR function going into your stop with a Compound Arrithmatic.  This can be an OR function with N terminals (it can be resized)  Wire into the 3rd terminal the error wire from the subVI.  Then it will stop if stop is pressed, or your timer duration is passed, or if there is an error.  The error will then go into the close function, and then simple error handler will show the error.

 

If this is generating an error maybe it would be best to just not display or log it and try again.  This can be in the subVI function, or outside.

0 Kudos
Message 5 of 5
(2,491 Views)