How to deal with the display of negative abnormal?
- zlf_ciom
- Posts: 6
- Joined: Thu Jun 30, 2011 3:54 am
How to deal with the display of negative abnormal?
I need to display negative in my project .The data sources in CAN transimit ,ande 2 bytes represent a number.I use the following expressions:IF(A>32767,A-65536,A) to calculate the data which has 2 bytes.When I send a negative using other CAN modulate ,most of the time i my design using PV750 can be display correctly,but it also jump to another data occasionally and come back the negative display quickly.How to deal with negative numbers jump .The other question is :how do you deal with the display of negative? Thanks!
- ksaenz
- Enovation Controls Development
- Posts: 263
- Joined: Thu Aug 19, 2010 7:53 am
Re: How to deal with the display of negative abnormal?
Hello zlf_ciom,
Sounds like you are receiving signed values.
Normally CAN parameters are unsigned values and if there is a need for negative values, an offset is applied. If you can control the device that sends the parameters I recommend that you make it send unsigned values with an offset if possible.
If you must do the conversion in the PV750 I recommend that you put your converted value in a second variable.
This:
B = IF(A>32767, A-65536, A)
Instead of this:
A = IF(A>32767, A-65536, A)
Regards,
ksaenz
Sounds like you are receiving signed values.
Normally CAN parameters are unsigned values and if there is a need for negative values, an offset is applied. If you can control the device that sends the parameters I recommend that you make it send unsigned values with an offset if possible.
If you must do the conversion in the PV750 I recommend that you put your converted value in a second variable.
This:
B = IF(A>32767, A-65536, A)
Instead of this:
A = IF(A>32767, A-65536, A)
Regards,
ksaenz