Example to demonstrate a simple product tester. Sets up the device (the input/output polarity, general purpose I/O configuration, and values for I/O). Enables the motors, moves them then homes the motors. If the motors trigger home input at zero, then unit passes. 



' Product Tester

DELAYS        'Small startup delay to allow unit to stabilize 


' Set test configuration

POLX=8,OK

POLY=8,OK

POLZ=8,OK

POLU=8,OK

IOCFG=4227858432,OK

IO=2147483647,2147483647

IOP=0,OK


' Enable motors

EO=7,OK

DELAYS


' Move motors away from Home and test that home input is off

X1000Y1000Z1000,OK

DELAYS

MSTX,0

MSTY,0

MSTZ,0


' Home motors

HX+0,OK

HY+0,OK

HZ+0,OK

DELAYS


' Move motors to 0 point from home then confirm the home input is on

X0Y0Z0,OK

DELAYS

MSTX,64

MSTY,64

MSTZ,64


' Test finished