Parker Hannifin
home | products | how to buy | support & downloads | literature | search

Click Here to go to new EM&D Knowledge Base (FAQ) site


Sample Program - Move Continuously, Stop on Inputs

MC is used for continuous motion. Below is a sample program.

The D4000 command sets the direction based on the sign of the numeric value; a D-4000 would set the direction as negative. The numeric value itself is irrelevant in MC, only the sign is important.

To stop on an input condition, first initiate motion and then LOOP another subprogram that does nothing but check for the inputs.

In order to be able to use the TR command after motion has been commanded change the setting of the CQ system variable. Setting the CQ to 0 will allow the processor to command motion and then execute subsequent commands like TR. This is similar to setting COMEXC1 in the 6K/6000 language.

1L1:

1W(CQ,0)

1A10

1V10

1MC

1D4000

1G

1LOOP(CHECK,0)

1END

1CHECK:

1TR(IN,=,1XXXX)

1S

1END

1SV