-32768 for your analog input value

The default out-of-range value for an analog input values for our SNAP and E1 / E2 brains, as you may know, is -32768. This could potentially be problematic if you happen to want to scale a point to, say:
-50000 to 0 (or anything that includes -32768 as part of the valid range)

This default can be changed via the memory map either using PAC Manager or even a command in your strategy.

Form 1465 (the OptoMMP Protocol Guide) documents the address for this value is:
FFFF F038 0298 (4-byte Float) Value shown when actual value is out of range. Default is –32,768

You might want to use something like 0x7FFFFFFF (NAN or Not a Number) instead of -32768. :cool:

Is anyone else using other non-default values for that out-of-range number?


Other references that may be of interest:
* Form 1755 (Using Floats Technical Note)

Nice, adding that to the powerup chart in my new strategy template. I don’t think I’ve ever had an issue with it, but everytime I see that -32768 it occurs to me that it will bite me some day.

Thanks, really enjoying the great tips here.


Just a thought… As of when we left the hospital (Nick, chime in here if you have changed it), we did not know about this ‘tip’ and so all our analog points were still at -32768… Since this number has pretty much been around since the dawn of time with all things Opto, we knew and ‘loved’ this number only too well. Thus we used this number to our advantage… we had a chart that would sweep our analog points now and then (every 15 seconds from memory) and look for this number. If it found it, it would send an email to us letting us know what rack, module and point number was out of range.
This saved a bunch of pain a whole lotta times, let me tell you (advanced notice of flooded basements and broken steam pipes are two that spring to mind).

If you change it to NAN or not a number, you can still trap it, but it does not ‘stick out’ as much as -32768.

Just a thought.


Another great idea… can tie that check into a “Loss of Communication” alarm for the point. Very slick. I’m mostly doing HVAC stuff these days, so I don’t worry overly about anything hitting -32768 degrees. :slight_smile:

I was about to argue that, whether or not you’re changing that -32768 out-of-range value, checking analog point values showing NAN might be a good idea too. When I asked Ben about this in person, he mentioned a couple clever PREVENTATIVE self-monitoring things he did to catch problems BEFORE they happen (like monitoring the power coming from the rack’s supply so if/when it starts to sag you catch it before the inputs get whacky and show NANs).

As he likes to say: BRILLIANT!

BTW, here’s a related post I put in our new “suggestion box” area on using IsFloatValid to check for NANs.


is there a way to impose this onto a float variable in a strategy? every time i try to move 0x7FFFFFFF to a float it always displays as ‘2.147484e+009’ (max value of float in PAC Control?)

I am writing a sub where a table with a fixed length is preloaded and sent to sub, but the table elements sometimes do not need to have their data processed. i figured that checking for a valid float is a neat way to process or skip data as needed rather than use a fixed value.

I know one way of doing this would be to read the value from the MMP location of the controller/brain into a float variable.

just wondering if any one else had another alternatives?


There is a significant distinction between “NAN” and the “out-of-range” value, specifically regarding this blog discussion. These two special values are reported via our I/O.

NAN is an analog value reported when the brain is unable to communicate to the analog module. NAN likely means the analog module has failed, the module is removed, the rack voltage is too low or is noisy (approximately 4.90 VDC or lower), or the module is not properly seated on the rack.

NAN is treated as a special value in certain software products. For example, NAN will trigger the OptoOPCServer or PAC Display to report the value as “bad.” If this is the case, the OptoOPCServer will not post values to the OPC Client. The client will only retain the last known value. In PAC Display, the last known value will “stick” in PAC Display Runtime (the event viewer will log the quality change of the tag as well).

An out-of-range value (the default of -32768.0) means the analog module is successfully reporting a value to the brain but due to some input condition, the module can not digitize the input because the analog input is beyond the module’s ability to convert it.

Out-of-range is indicative of excessive input. In some cases, the value may indicate permanent damage to the input of an analog module (but minor enough damage that permits the module to attempt to digitize an invalid analog input).

If you need to modify the out-of-range value, I would avoid using NAN due to the error exception of this value in certain software products. The common value between both conditions will confuse operators, maintenance staff, and the system integrator when the out of range value is forgotten.

For the out of range value, I would use a value outside the scaled range of all the inputs on the rack (or possibly for the entire control system). Keep in mind that changing this value affects all of the out-of-range values for the entire rack.

If you want to use NAN as an indicator, you may initialize a variable constant with the command Move32Bits.

i32Temp = 0x7fffffff;
Move32Bits(i32Temp, f32NanValue);

“IsFloatValid” works for testing this analog input case.


One more tiny point for the Load Cell module user. The out of range value is -8388608.0.

Bryce and all,
I also found one other issue, Pac Display alarms do not alarm an NAN value as well. It doesn’t recognize it so no action is taken.

To further make your point Bryce, I used to get NAN’s from some current input modules because the CT’s where too far undersized on primary current range.


But what about the electrical causes for seeing these numbers? Here is a specific current example: on a 4-20mA input module scaled for 4mA = 0% and 20mA = 100% if the transmitter is disconnected i.e. open-circuit it reads -25%. Sometimes however I get -32768. So what does that signify electrically? If open circuit is -25% what is -32768? Short circuit? Low voltage? What?