Checking for an invalid parameter

Discuss issues and ideas you have to configuring displays with PowerVision
mbowdich
Posts: 209
Joined: Tue Oct 05, 2010 10:54 am

Checking for an invalid parameter

Post by mbowdich » Fri Jul 15, 2011 8:27 am

When using smRead(), and invalid parameter is being read as a 0. Is there a way to determine in a script if a parameter is invalid? Unfortunately, I cannot use 0 as the indicator, because 0 could also be valid data.
Jstoner
Posts: 8
Joined: Tue Jan 25, 2011 12:46 pm

Re: Checking for an invalid parameter

Post by Jstoner » Mon Jul 18, 2011 8:36 am

I actually just ran into this same situation, except I also want to SET parameters as invalid. This stems from a desire to use the invalid state as a way to control which gauges are seen on the screen.
jdgallaher
Enovation Controls Development
Enovation Controls Development
Posts: 9
Joined: Tue Sep 14, 2010 11:30 am

Re: Checking for an invalid parameter

Post by jdgallaher » Mon Jul 18, 2011 10:28 am

smRead() returns the validity of the parameter.

i.e.
dataValid = smRead(dataHandle, dataVariable);
mbowdich
Posts: 209
Joined: Tue Oct 05, 2010 10:54 am

Re: Checking for an invalid parameter

Post by mbowdich » Mon Jul 18, 2011 12:11 pm

Thanks. I missed that first line in the scripting guide that explained it.