I have recently started using Orocos with the SOEM master.
I would have a question about the correct method to send PDO.
So the question is:
after setting a PDO mapping with SDO, I want, for example, send a PDO that
contain the target_position (short of 16 bit).
First of all, I have to write it in slave[i].outputs, supposing it is the
first variable in the pdo mapping. Then I have to send it using
So I think I have to do that in the updateHook() of the master in this way:
if ((inPort.connected()) && (inPort.read(target_position)==RTT::NewData))
where target_position can be used connected to an input port of the
SoemMasterComponent (to be sett from another component) in this way:
this->ports()->addPort("inPort",inPort).doc("signal from the Orocos
component that commands the master");
Is it the correct way? There is a problem because I'm
doing memcpy(ec_slave.outputs,&target_position ,2); and
ec_send_processdata(); in the same thread [the only one thread that is
executing the updateHook() of the master component??
Are you doing in a different way?
Any suggestion would be helpful