I did a MCD Simulation where I want to write the center of mass coordinates (as they are displayed by the inspector) of an moving object to OPC tags. But in the signal adapter i can only write values from OPC tags to runtime parameters but not the other way round... Is there any way to acces those values, as they are obviously beeing calculated.
Thanks in advance!
Solved! Go to Solution.
In the Signal Adapter, you need to create a signal for the desired parameter (center mass coordinates). When you add the signal in the Signal group, use the Input/Output column to set the center mass coordinates signal to output.
Worked perfectly, thank you!
I have another question: Is it possible to write the simulation time (count of simulation steps) to a signal, so that I can also acces it via OPC and use it as a trigger for other applications?
My initial thought is to create the trigger in MCD. Create a boolean Runtime Parameter and then use the Operation command to trigger the change. The Operation command can be used as either an event based or time based trigger. You can then create a signal for the parameter value.
you can define a Signal for the Simulation time or Simulation Steps if you use the "Insert Function" in the Signal Adapter dialog, here is an example:
In the "Insert Function" tab you can switch to MCD based Functions and use "sim_elapsed_time()"
you should be able to "assign" the Integer Signal directly to your Speed Parameter from your "Position Control", you can do it directly in the "Signal Adapter" (see attached screenshot and video).
Please keep in mind that a "Position Control" always needs a position to where it should drive to otherwise it wont move.
You could also use the "Speed Control" if you only want to assign a speed to the axis.
Thanks for the reply. The video don't load. Isn't available.
I did the same as you show in your screen capture but the speed is not assigned to the parameter of my possition control. I changed the parameter to "acceleration" but it also doesn't work. You can show it in the image of the Inspector that I approached below.
yes the speed in the Runtime Inspector wont update until the Position Control has also a target position, updating only the speed is not enough... For that there is the Speed Control that does not require a target position.
Now the Video should works since it is uploaded as attachement.
Please let me know if it helps.