Hi i am preparing a motor simulation in twincat 3 in visual studio using structured text.There should be a positive and negative limit for the movement. If you start movement the position should change(increment or decrement) accordingly and stop at the prescribed limit.No need for any UI for motor. You can just give a label or textbox that updates accordingly.
Asked
Active
Viewed 848 times
1 Answers
1
At first you should know what you actually want to simulate. Do you know what type of Motor will be used in the real application and how it will be connected to your program? Maybe you are using a motor/axis that will be controlled with digital/analog outputs. Or it will be controlled over NC. Or something completely different? I assume an NC Axis. Then there is no need to write asditional code and you can add a Virtual NC Axis to the NC part of your TwinCat Project. You have to add a AXiS_REF stucture to your program connect it to the Virtual NC Axis. With this structure you can communicate with the axis. You can write your own FBs to control and diagnose the AXIs_REF or use the MotionControl Library shipped with TwinCat.

Felix Keil
- 2,344
- 1
- 25
- 27