Sample Structured Text ST Program: Basic Motion (Power, Home, Cycle)

Here's a simple sample Structured Text ST program. It starts when the PLC application starts. It enables the motor (MC_Power), homes the axis (MC_Home), and then extends and retracts repeatedly with a time delay after each move.

Select the project that matches your version of Parker Automation Manager:

PAM1.4: Motion_ST_PAM1.4

PAM1.2: Motion_ST_PAM1.2

Here's a video of it running within the PAC IDE software: MOBILE USERS CLICK HERE

 

Note: A PAC320 hardware controller isn't necessary to run this. See below for details:

For PAM1.4:
Under the "Online" tab at the top of the PAM window, make sure "Simulation" is checked. Whenever you go to login now, PAM will run a simulated device to run your project.
Make sure to uncheck this box when you want to connect and login to a physical PAC.

 

For PAM1.3 or earlier:
You can use an application with a CODESYS Control Win V3 device (You must add this). Under Online > Simulation. Then you can after Build (F11), click Online > Login.
This will create a virtual PLC and allow you to run PLC simulation (Play or F5). Here's some screen captures:

motion_st_sim_3487-20240521-001115.jpg

 

motion_st_sim_visu_3488-20240521-001115.jpg

 

 

Note, if you are using CODESYS SoftMotion Win V3 it will launch a DOS window allowing simulation of motion and will run for two hours before disabling. This window can be minimized but motion simulation is disabled when this window is closed.

 

 

3/15jh

1NOV18 JD