Jun 3, 2011

Mint Motion Language Programming Tutorial - Part 8

Today is the last part of the 8 part series of Baldor Mint Programming language Tutorial. We have tried to cover all the necessary topics in our tutorials. In this tutorial we will see some Keywords for advanced configuration and also some of error handling Tips, also a little light on interrupts and events.

Advanced I/O Configuration Procedure in Mint :-

Inputs can be configured as level triggered or edge triggered. Level triggered inputs can be configured as active high or active low. Edge triggered inputs can be configured positive edge, negative edge or both.
INPUTMODE = 0x00001F :rem Inputs 0 to 4 edge triggered
INPUTACTIVELEVEL = 0x0003ffff :rem Inputs 0 to 17 active high
INPUTPOSTRIGGER = 0x00000401 :rem Inputs 0,10 +ve edge trig.
INPUTNEGTRIGGER = 0x00000402 :rem Inputs 1,10 -ve edge trig.
INSTATEX.x keyword can be used to decide if input is on/off independent of configuration

Digital outputs can be configured as active high or active low
ACTIVEOUTLEVEL = 0xFF0 :rem O/Ps 4 to 11 active high
Digital inputs can be assigned a specific use as well Forward limit switch, Reverse limit switch, Home switch, Error input, Stop switch .Digital outputs can be assigned as drive enable channels.
DRIVEENABLEOUTPUT.0 = 6 :rem Output 6 follows drive’s enable state. Workbench can be used to setup I/O configuration.

Interrupts and Events in Mint:-


MINT allows a sub-routine or reserved label to be defined for each digital input, named EVENT IN0, EVENT IN1 etc...When an input is activated, if the corresponding interrupt routine exists, it will be called. The routine will be executed after the current statement except for GO, PAUSE and WAIT. Pre-defined interrupt routines also exist for Stop input, Fast input, Timer, Error and CAN events. An interrupt cannot interrupt itself - further calls to that interrupt are buffered. An interrupt can be interrupted by a higher priority interrupt, the lower priority one continuing once the higher priority one has finished.

Interrupts other than Event STOP and Event ONERROR can be enabled, disabled and checked using the following keywords….
EVENTDISABLE
Disable interrupts when a bit is set in the bitmask (bit pattern follows priority mapping - highest priority = bit 0)
Enable interrupts when a bit is cleared in the bitmask.
EVENTPENDING
A bit is set to indicate a pending event,Clear a bit to clear a specific event.
EVENTACTIVE
A bit is set to indicate an event is currently active.

Asynchronous Errors in Mint MT:-

Asynchronous errors are produced at run time
In the range 0 - 502 and 3100 upwards - MintMT copies the error value to ERR keyword
Tree-structured Error hierarchy.
For example, Err 501 (Miscellaneous error) would require query of MISCERROR to diagnose
Axis errors are caused by axis motion (query AXISERROR for detail)
Hardware limit error, Software limit error, Exceeding maximum following error, External error input.

When an axis error occurs, the action taken can be user controlled
The error mode switches such as FOLERRORMODE, LIMITMODE, control what action an axis will take in the event of an error. The ONERROR event is called if defined and enabled. The ERR keyword is read to indicate the class of error. Axis errors are read with the AXISERROR keyword. Miscellaneous errors are read with MISCERROR. CAN errors are read with the CANSTATUS keyword. Clever use of ONERROR and tasks can keep ‘healthy’ axes running despite other errors.

We hope that you must have learned a lot of things about Baldor Servo Drives and Motion Controllers through this 8 part Series of Programming Tutorial.
Subscribe to Automation-Talk by Email.

Advertisements :-

0 comments:

Post a Comment

Receive all updates via Facebook. Just Click the Like Button Below