[etherlab-users] Download negative SDO values with EtherLab command line tool

Richard Hacker ha at igh.de
Tue Aug 5 16:48:36 CEST 2014


Am 2014-08-05 15:37, schrieb Michael Wenz:
> Hello,
>
> I am using Etherlab 1.5.2, Linux kernel 3.2.21, Xenomai-2.6.2.1
>
> and I would like to download negative floating point values with the
> EtherLab command line tool to a slave:
>
> e.g. ./ethercat download -p0 0x2001 0x9 -10.3
>
> It is no problem to download positive values, but negative values cannot
> be downloaded with the above call.
>
> The SDO entry has type 32 bit float.
Try downloading a hex value:
-10.3 = 0xc124cccd

See attached proggie (assumes little endian computer):
# num2hex -10.3
-10.300000 = 0xC124CCCD

>
> Do you have any advice, please?
>
> Kind regards
>
>                 Michael
>
>
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: num2hex
Type: application/octet-stream
Size: 11906 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140805/505aac4f/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: num2hex.c
Type: text/x-csrc
Size: 1052 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140805/505aac4f/attachment-0005.c>


More information about the Etherlab-users mailing list