nonSimulation loop
Posted: 31 Mar 2025, 09:27
I am working no a project, which requires a modbus communication between python script and Coppelia Sim. I've made a child customization script in Coppelia to establish the client and my python app is providing the server side. I am using pyModbusTCP to make it work.
I now need to start the simulation via the modbus, so I need a loop checking whether there is a set up register or coil for that. Unfortunatelly that causes the Abort. I know aborting can be disabled in usrset.txt, but I'd prefer rather more elegant solution without messing with this settings. Is there any efficient way to do so?
Do you also have any suggestions on how to make the modbus communication as fast as possible? The scene won't be too heavy and I need as little latency as possible. I am using the threaded script, but I can notice slight delay in simulation time when using modbus to write data from simulation to registers in each simulation step.
I now need to start the simulation via the modbus, so I need a loop checking whether there is a set up register or coil for that. Unfortunatelly that causes the Abort. I know aborting can be disabled in usrset.txt, but I'd prefer rather more elegant solution without messing with this settings. Is there any efficient way to do so?
Do you also have any suggestions on how to make the modbus communication as fast as possible? The scene won't be too heavy and I need as little latency as possible. I am using the threaded script, but I can notice slight delay in simulation time when using modbus to write data from simulation to registers in each simulation step.