Open jinyistudio534 opened 5 months ago
I guess that you actually want to know how to use a PacketDesc
. That is declared with something like
myData = PacketDesc(SyncManager.IN, 12, "H")
meaning that at position 12 in the input sync manager, i.e. the one to get data from the slave to the master, there is an unsigned 16 bit integer ("H"), that one can read.
myBit = PacketDesc(SyncManager.OUT, 24, 5)
means at byte position 24, bit number 5 can be written to the slave.
Hi,
Well, this is an enum, with two possible values: IN
and OUT
. Unfortunately, sphinx always auto-generated this weird documentation, I still have to figure out how to stop it from doing so.
I guess that you actually want to know how to use a
PacketDesc
. That is declared with something likemyData = PacketDesc(SyncManager.IN, 12, "H")
meaning that at position 12 in the input sync manager, i.e. the one to get data from the slave to the master, there is an unsigned 16 bit integer ("H"), that one can read.
myBit = PacketDesc(SyncManager.OUT, 24, 5)
means at byte position 24, bit number 5 can be written to the slave.
👉👉👉_Use PacketDesc() to read or write 32 bytes at a time. How to input format ?_
I am not sure what you try to do. You could try to use "32s"
, that should work at least with the normal (not fast) ethercat. In Fast ethercat mode, this is not possible as EBPF does not allow to read or write 32 bytes at a time.
Hi, Sorry, can you give me a sample program to teach me how to use SyncManager ?