64-bit macros are already defined in ecrt.h, so just use them.

 

In general though, if you want to deal with other data sizes, have a look at 
how the macros are defined, and define your own versions.  They’re just 
wrappers around standard conditional byte-swapping calculations.

 

Data on EtherCAT is little-endian by convention (although occasionally a slave 
will do something different), so the byte-swapping is only needed if your 
master code might run on a big-endian processor.

 

From: Eshwar Lal
Sent: Friday, 10 February 2017 02:26
To: etherlab-users@etherlab.org
Subject: [etherlab-users] EtherCAT data size compatibility issue

 

 

hello all,

 

I am using EtherCAT master with ESC FC1100 for performing HIL simulations, I am 
using ecrt.h api functions to send a receive data variables,

 

EC_READ_U32 and EC_WRITE_U32, which support only 32bit unsigned values, however 
my process variable is 64bit in size.

 

is there any possible solution to this problem? so that I can transfer the 
variables 64bit in size over etherCAT and perform calculation for my simulation 
or any other possible tip to convert the 64bit variable to 32bit just for 
transmit and receive purpose. Or a method to transfer and receive 64bit values 
over EtherCAT.

it would be great to hear a positive solution to rectify the issue.

 

Note: I am using Linux kernel with RTAI.

_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to