PLC ST Basic 2, 3, 4
Last updated
Was this helpful?
Last updated
Was this helpful?
File -> new -> project -> TwinCat XAE prject(XML format) -> input file name & ok
Solution Explorer -> PLC right click to 'add new items'-> standard project
Solution Explorer -> SYSTEM -> License -> 7 day trial license
DUT = data unit type
GVL = global variable
POU = program organization unit
Solution Explorer -> TwinCat -> SPS -> new element -> standard plc project -> enter name: code_X-> OK
Solution Explorer -> TwinCat -> SPS -> code_X -> POUs -> MAIN (PRG)
input_code -> active configuration -> login -> start
Solution Explorer -> SYSTEM -> Real-Time -> Online window
Solution Explorer -> SYSTEM -> Tasks -> PLC task -> task window -> cycle ticks input -> 1 => active configuration -> login -> start
When we set cycle ticks to 1 ms, each cycle will be 1ms.
If the process finsished before 1ms, e.g. 0.5ms, the system will wait till 1ms, then to start next cycle.