12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Special CommandsThe following <strong>spec</strong>ial commands are available through the motor_par() function.The two letter commands are direct implementations of commands described in theOMS manual. Refer to that manual for more information. Not all commands areavailable on all versions of the OMS controllers or on all firmware versions for a particularcontroller.motor_par(motor, "PA", mode) — If mode is 1, the controller turns motor power onbefore each move and off after the move (assuming motor power is controlledby the auxiliary output pins). If mode is 0, motor power stays on.motor_par(motor, "SE", msec) — Sets the settling time in milliseconds to be usedbefore the power is reduced in PA mode.motor_par(motor, "AF") — Turns auxiliary power off.motor_par(motor, "AN") — Turns auxiliary power on.motor_par(motor, "BH", mask) — Sets general purpose output pins high, according towhich of bits 0-13 in mask are set.motor_par(motor, "BL", mask) — Sets general purpose output pins low, according towhich of bits 0-13 in mask are set.motor_par(motor, "BX") — Returns the state of the general purpose input pins. Aone in any binary position in the value returned indicates that the correspondingpin is low.motor_par(motor, "RB") — Returns the direction of the general purpose I/O lines.Output bits return a one, while input bits return a zero.Command Pass ThroughCommand pass through is available using the following functions. Command passthrough should be used with caution to avoid interfering with the built-in programmingcommands <strong>spec</strong> sends to the OMS controllers.motor_par(motor, "send", cmd) — Sends the string cmd to the OMS channel associatedwith motor . For example, set cmd to "LF" to disable hardware limits onthe associated motor.motor_par(motor, "read", cmd) — Sends the string cmd to the OMS channel associatedwith motor ,asabove, and returns a string containing the response. Forexample,242 HARDWARE REFERENCE INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!