The commands described here are only available when writing a standalone program.


In standalone programs, this command is used to define the beginning and end of a main program. All code is written between the PRG and END lines.


For 4 axis controllers, four (4) standalone programs are available.


For 2 axis controllers, two (2) standalone programs are available.


Applies to: CMD-4CR, CMD-4EX-SA, PMX-4EX-SA, PMX-4ET-SA, PMX-2ED-SA, PMX-2EX-SA


Standalone                PRG [prg#]

                       ;main program

       END

Syntax:                        

Write:

PRG [prg#]                 

Where:        [prg#] [0-3] for 4 axis controllers [CMD-4CR, CMD-4EX-SA, PMX-4EX-SA, PMX-4ET-SA]

                                 [0-1] for 2 axis controllers [PMX-2ED-SA, PMX-2EX-SA] 

       END 

Reply: 

Command is accepted and executed

No Reply

Example: 

Write:        

PRG 0                        * Program start line, program 0

HSPD=20000                * Set the high speed to 20000 pulse/sec

LSPD=500                * Set the low speed to 500 pulse/sec

;main program         * main program code.

END                         * End of program 0

Notes:

  • If PRG number is not included then program is assigned to program 0.
  • If only one main program is used in the standalone, then PRG is not required.

See also:

Standalone Programming Commands


Commander Manual

2.1.1.1 Identification Number