
adccommunitymod (AutomationDirect) asked a question.
Created Date: June 06,2009
Created By: bfitz
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Any tips on how to set up the display to subtract an arbitrary amount from a number? I have a temp reading in the PLC that has had 500 added to it. I do this to avoid having the reading go negative and having to deal with that in the program (other than the once when I am adding 500). The number is stored as a binary (decimal) number. What I would like to do (and thought I could do), is display this number on screen with the offset having been removed. However, the scaling doesn't seem to be working how I thought it would. I have the tag setup in the C-More as a Signed Decimal tag. Then I set the scaling tab to read PLC 0 to 32767, HMI -500 to 32267. I thought this would shift the number downscale by 500, but doesn't seem to be working. Any thoughts? Thanks, Brian
Created Date: June 06,2009
Created by: bfitz
I think I answered my own question. I am adding 500 degrees to the reading which ends up being 5000 after you include the implied decimal place. I had forgotten the decimal place and was, in effect, subtracting 50 degrees on the HMI. Amazing what a little sleep can do. :)
Brian
Created Date: June 06,2009
Created by: milldrone
Amazing what a little sleep can do. :)
Brian
And another satisfied customer!:D
Brian,
With your newly rejuvenated mind, can you think of a way to do the pointer thing over at the "pointer " thread?
Created Date: June 06,2009
Created by: bfitz
Any tips on how to set up the display to subtract an arbitrary amount from a number? I have a temp reading in the PLC that has had 500 added to it. I do this to avoid having the reading go negative and having to deal with that in the program (other than the once when I am adding 500). The number is stored as a binary (decimal) number.
What I would like to do (and thought I could do), is display this number on screen with the offset having been removed. However, the scaling doesn't seem to be working how I thought it would. I have the tag setup in the C-More as a Signed Decimal tag. Then I set the scaling tab to read PLC 0 to 32767, HMI -500 to 32267. I thought this would shift the number downscale by 500, but doesn't seem to be working.
Any thoughts?
Thanks,
Brian