Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Quick Panel displaying negative values

Status
Not open for further replies.

YuriSarcas

Electrical
Dec 4, 2008
24
0
0
US
I have a quick Panel that I am programing in proficy. I have a modbus register coming in that is a negative value. the quick panel shows this as a value of 0. how can I get it to show the negative value?
 
Replies continue below

Recommended for you

I know nothing about your system. But most systems have variables or records than can be declared or typecast to handle negative values. Like Integer instead of Absolute.

Is it as easy as that?

If not, you will have to write a function that detects negative values, converts it to absulute value, displays it and adds the sign in the display. I cannot imagine that you shall have to do that in a modern system, though.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
it is just a raw value. I can read it with a modbus scanner as a value of -14 but the display shows it as 0. if the value would change to a positive then the display reads it correctly. I have tried to change it to a DINT or a REAL and that did not work. There has to be something simple I am missing but everything I have tried has not been successful. I will try to get a hold of GE tomorrow and maybe they can point me in the right direction.

Thank you for your response.
 
Some times there is a scale associated with a displayed value.

There are systems where if the scale is 0 to something positive and your value is negative, the scaling function will truncate the value at scale minimum, 0.
 
There's the one offset in Modbus register addressing, the difference between starting a count at zero or at one.

You could be reading an address that starts at zero in the Modbus scanner but the panel starts at one (or vice versa)

Try reading the modbus address one plus or one minus of the target register address and see if something other than zero appears.

 
Check what danw2 suggests. Also verify that you do not need to swap bytes as some Modbus devices use motorola vs. intel byte (Big endian vs. Little endian) order.
This is a parameter of the driver but it's location is depending on which driver you are using in the QuickPanel either Native or OPC and Serial or Ethernet. You will be able to find it in the driver's help.


 
Status
Not open for further replies.
Back
Top