Hello! First of all, thank you very much for the excellent case you provided. There are some questions in your case, I hope you can answer them.
When the output target value of PLC is matched in variables, which attribute value of THE PLC target value is connected to VC?
I’m connecting property values similar to J2, but once the output changes, the VC component is teleporting over, not moving over.I hope you can explain or provide the download link of the case.
Regards
what variable you have put there in your Link Node for the jog movement? It is required that the default Servo jog variable is removed and a Property - - > “Real” is inserted into the Link node as an expression e.g. Tx(X_move_from_PLC) , here the variable “X_move_from_PLC” is something you have to create in your component. Then connect the PLC’s X movement variable to this Simulation component variable.
I use the “translation” defined by the joint to control the servo. The PLC is connected to the attribute of the joint value. One problem is that after the value is changed, the joint does not move in real time, but moves instantly.
you are on the right track. I am not sure what you mean by Joint “moves instantly” but I can guess. The PLC variable which you have connected to this “Xtarget” should be incrementing or decrementing steadily e.g. goes from 100.0 to 300.0 with 0.1 mm increment every PLC scan cycle (usually 25 micro second), whatever your values are there in PLC variable will be reflected within the Tx(Xtarget) expression smoothly, should not be a problem.
***important: the variable “Xtarget” has a property “Rebuild component with each value change”, you must deactivate it !
You mean that the value transmitted by the PLC to the VC is the position value in increments of 0.1mm. Instead of passing it a specific value (for example: 300)?
My initial idea was that PLC gave a specific value to the joints of VC, and the joints of VC proceed according to the “Servo.moveJoint” method, instead of immediately moving to this specific value, there is no intermediate process.
Regards
If you want to use the speed, acceleration, deceleration of VC in-built servo then why would you need to send signal from PLC to VC for servo move? The whole idea of my post is to utilize Dynamic behavior of Siemens virtual servo’s to get more realistic movement of component axis and then see them in 3D in Visual Components. And in practical cases I agree that PLC usually gives a position value to the Servo Drive and the servo does the rest. If you want to do something similar then you have to send this position signal from PLC to VC and use a python script to move your axis’s in simulation.
I am verifying that the virtual PLC controls the servo movement, which is the same as reality, but the logic is carried out on the PLC. The best way is to control the servo by the PLC instead of using Python scripts. Is this possible?
Maybe I am a novice and it is difficult to understand these. Can you provide the relevant layout and procedures? I may understand it with your test, thank you very much!