Hi everyone,
Basicaly trie to add custom instruction.
I am trying to apply a custom delay inside a Process Node based on real datasets. I have a CSV file containing processing times, and I want to randomly pick one of these values for each part that enters the node.
I wrote a Python script to read the CSV file and extract the random value. However, I am struggling to cleanly link this Python script to the Process Node execution.
What I tried: I attempted to use Boolean Signals as a “handshake” between the Process Node and the script. I used a SendSignal statement in the Process routine to trigger the Python script, and tried both OnSignal(signal) and yield waitSignal() in the Python code to update a component property (which is then used as the Delay time).
The issue: It doesn’t seem to work reliably at all. My simulation either gets stuck in an infinite loop, or the simulation time completely freezes (e.g., at 15 seconds) right at the signal statement. The flow just stops.
Does anyone know the cleanest and most standard way to achieve this? Is there a better approach than using signals to link a Python script (reading an external file) to a Process Node delay?
Thanks in advance for your help!