PLUS+1 Tools > PLUS+1 GUIDE

Input hexadecimal???

(1/4) > >>

Ebby:
Hi guys
We added load cell digitizer to the canbus line and displaying it on the screen. But the data that comes to the display is not correct.
For example in IFM we can get the no: 0.0126290 for unload load cell and when we put the 74kg on load cell the no. changed to 0.020848 and with the loadfactor 2500 :
0.0126290*2500=31.5725
0.0420848*2500=105.212
105.212-31.5725=73.6395

But in the Danfoss display unit 0.0126290 shows 3184174205 .
In the IFM program there is a Pointer function that can point to any data type or function block even to user-defined types. But  in plus one we cannot find it????

jashom1:
Hi Ebby,

Have you considered that the result that you are receiving on the CAN data could be a float?

Danfoss don't really do floats, but it is possible to make your own float to real number conversion.  I converted the data you were seeing (3184174205) into a float which gave me -0.0989465489983559 if that helps at all?

Cheers,

John.

Ebby:
Thanks John
could you please let me know what should I change in can input

FluidPowerTom:
As Jashom said you cannot do floating point type numbers with  PLUS1 controllers, so that's one thing that you'll need to handle (which is pretty much as easy as just scaling down your load factor and maybe using bit shifting).  Also, is it possible that your Danfoss display isn't programmed to correctly unpack the data?  Double check which bytes you're combining, what order they're in, and what the scaling/offset is.

On that image you posted the red crosses indicate that those lines aren't actually connected, so that won't compile.  Ebby, we'd need technical documents on your sensor to say for sure if that looks correct.  Also, it seems weird that what I think are your first two bytes are S8 data type while 2 and 3 are U8 (and 4 - 7 are U16?).  I'd double check your data typing.

Ebby:
I found Call POU block in the controller section and I am thinking should be able to point the data to the float and then real
could you please let me know is that correct and possible or not?
cheers

Navigation

[0] Message Index

[#] Next page

Go to full version