Topic: DMD0550 CTRIO Module Configuration - Configure IO |
|
Configure IO Overview:To get to the CTRIO Module Configuration - Configure IO dialog:
Here is where the input and output functions of the CTRIO are defined.
Configuring CTRIO InputsThere are basically 10 input settings but they are not supported on all inputs and some are mutually exclusive of others. However the configuration dialog will change dynamically to show which ones are available:
Configuring CTRIO OutputsThere are basically 5 output settings but they are not supported on all outputs and some are mutually exclusive of others. However the configuration dialog will change dynamically to show which ones are available:
|
|
CTRIO Input Functions:Counter Function
This function is available for Ch1A, Ch1B, Ch2A & Ch2B inputs. It counts single-ended pulses. By default there are 4 basic options available:
The raw count value (if there is no scaling) is reported in the CTRIO structure. For example:
Other interfaces to the count function in the CTRIO structure are, for example:
Also a software reset bit can be set to reset the count to the reset value, for example:
The counter function can be further modified by the C & D inputs and will be covered in detail below. These are the already-mentioned Reset Fn1 / Reset Fn2, Capture Fn1 and Inhibit Fn1 input functions.
Quad Counter
This function is available for Ch1A/Ch1B & Ch2A/Ch2B input pairs. It counts quadrature encoder pulses. By default there are 3 basic options available:
The raw count value (if there is no scaling) is reported in the CTRIO structure. For example:
Other interfaces to the count function in the CTRIO structure are, for example:
Also a software reset bit can be set to reset the count to the reset value, for example:
The quad counter function can further be modified by the C & D inputs which will be covered in detail below. These are the already-mentioned Reset Fn1, Capture Fn1 and Inhibit Fn1 input functions.
Pulse Catch
This function is available for Ch1C, Ch1D, Ch2C & Ch2D inputs. This function qualifies a short-duration pulse by a minimum width in microseconds and outputs a software bit of millisecond length. This allows the Do-more controller to catch unusually quick pulses that normal input modules would miss. By default there are 3 basic options available:
To enable the function once it is configured, a bit in the CTRIO structure must manually be set ON. For example:
Once the function is enabled, then when a pulse has been detected, this is reported in the CTRIO structure. For example:
When the pulse is qualified then a bit in the CTRIO structure is set for the Pulse Out Width duration. For example:
Edge Timer
This function is available for Ch1C, Ch1D, Ch2C & Ch2D inputs. This function measures the time from edge to edge of a pulse. By default there are 4 basic options available:
To enable the function once it is configured, a bit in the CTRIO structure must manually be set ON. For example:
Once the function is enabled, then when a pulse has been detected, this is reported in the CTRIO structure. For example:
When the first edge is detected the timer starts running and is reported in the CTRIO structure. For example:
If the second edge is detected a successful measurement and its value are reported in the CTRIO structure. For example:
If Timeout is enabled and the second edge is not detected before the Timeout value is reached, this is reported in the CTRIO structure. For example:
If free run is not enabled, then the edge timer must be re-enabled to measure another edge time. If free run is enabled the edge timer re-enables itself.
Dual Edge Timer
This function is available for Ch1C/Ch1D, Ch1D/Ch1C, Ch2C/Ch2D & Ch2D/Ch2C input pairs. This function measures the time from the edge of a pulse on one input to the edge of a pulse on a second input. By default there are 4 basic options available:
To enable the function once it is configured, a bit in the CTRIO structure must manually be set ON. For example:
Once the function is enabled, then when a pulse has been detected on the first input, this is reported in the CTRIO structure. For example:
When the first edge is detected the timer starts running and is reported in the CTRIO structure. For example:
If the second edge is detected a successful measurement and its value are reported in the CTRIO structure. For example:
If Timeout is enabled and the second edge is not detected before the Timeout value is reached, this is reported in the CTRIO structure. For example:
If free run is not enabled, then the dual edge timer must be re-enabled to measure another dual edge time. If free run is enabled the dual edge timer re-enables itself.
Reset Count
Reset Fn1 is available on Ch1C or Ch2C only if a counter or quad counter has been configured for function 1. In other words, only if Ch1A or Ch2A are configured as a counter, or Ch1A/Ch1B or Ch2A/Ch2B are configured as a quad counter. This function modifies the counter/quad counter function box by adding a button. It allows the C input to reset the count value to the reset value. By default there is one option:
Reset Fn2 is available on Ch1D or Ch2D only if a counter has been configured for Ch1B or Ch2B respectively. It is functionally equivalent to Reset Fn1.
Note: It is also possible to reset the count using the CTRIO's own channel/function structure member bit (.Reset). When this bit is ON, the count is reset; when this bit is OFF, the counter function is free to count.
Capture Count
Capture Fn1 is available on Ch1D or Ch2D only if a counter or quad counter has been configured for function 1. In other words, only if Ch1A or Ch2A are configured as a counter, or Ch1A/Ch1B or Ch2A/Ch2B pairs are configured as a quad counter will the capture function be available. This function modifies the counter/quad counter function box by adding a button. It allows input D to snapshot the count on function 1 and store it into a CTRIO structure register. By default there is one option:
This function works in the following manner:
Inhibit Counting
Inhibit Fn1 is available on Ch1D or Ch2D only if a counter or quad counter has been configured for function 1. In other words, only if Ch1A or Ch2A are configured as a counter, or Ch1A/Ch1B or Ch2A/Ch2B pairs are configured as a quad counter will the inhibit function be available. This function modifies the counter/quad counter function box by adding a button. It allows input D to inhibit function 1 counter from counting pulses. By default there is one option:
When the inhibit signal is seen on input D, it causes the CTRIO function 1 counter to stop counting pulses. When the inhibit signal disappears, counting will resume.
Limit For Output
Limit Out 0 and Limit Out 2 are available on Ch1C, Ch1D, Ch2C & Ch2D only if Output0/1 and Output2/3 are configured as either pulse (step/direction) or pulse (cw/ccw). This function allows input C and/or input D to be used in conjunction with a CTRIO pulse output instruction. The CTRIO instructions that can utilize this feature are:
|
|
CTRIO Output Functions:Raw Output
Raw is available on Out0, Out1, Out2 & Out3. This function allows the Do-more controller to directly turn this output ON or OFF via a CTRIO structure. For example:
Setting ON or resetting this bit OFF directly causes the CTRIO output to turn ON or go OFF.
Discrete Output For Input Function
Discrete on Chx/Fnx is available on Out0, Out1, Out2 & Out3. This function allows the output to be used in conjunction with a CTRIO input function and preset or to be used by previously defined discrete output tables. This function modifies the function box by adding a preset button. By default there can be 2 options (Preset mode and Level mode):
Discrete Output For Pulse Output Function
Discrete on Pulse Out x/x is available on Out0, Out1, Out2 & Out3 but only if one output pair (i.e. Out0/Out1 or Out2/Out3) is configured for Pulse Output. This function allows the output to be used in conjunction with the other pulse output pair and utilized by a previously defined discrete output table. This works just like the Discrete Output For Input Function above with the exception that the Preset or Level buttons are not supported.
Pulse Output
Pulse (Step/Dir) / Pulse (CW/CCW) is available on Out0/Out1 & Out2/Out3 pairs. This function allows two outputs to be used together where the first one is a pulse output and the second one is a direction output bit (step/dir) or where the first one generates pulses for clockwise motion and the second one generates pulses for counter-clockwise motion (cw/ccw). This function is used in conjunction with previously defined pulse profiles and/or CTRIO Do-more instructions.
Previously defined pulse profiles and CTRIO Do-more instructions that are used with pulse output:
|
|
See Also:Module Configuration for H2-CTRIO, H2-CTRIO2 or T1H-CTRIO CTRIO / CTRIO2 InstructionsCTDYNPOS - CTRIO Run Dynamic Position Mode CTDYNVEL
- CTRIO Run Dynamic Velocity Mode
CTPLSADD - CTRIO Add Entry to PLS CTPLSEDT
- CTRIO Edit PLS Entry
CTREGWR -
CTRIO Write Register
CTRUNPOS - CTRIO Run Position Mode CTRUNVEL
- CTRIO Run Velocity Mode
CTTBLADD - CTRIO Add Entry to Preset Table CTTBLEDT
- CTRIO Edit Preset Table Entry
CTRIO2 Only InstructionsCTAXCFG - CTRIO2
Axis Configuration
CTAXDYNP - CTRIO2 Axis Run Dynamic Position Mode CTAXDYNV
- CTRIO2 Axis Run Dynamic Velocity Mode
CTAXTRAP - CTRIO2 Axis Run Trapezoid CTAXLIMT
- CTRIO2 Axis Run Trapezoid w/ Limits
CTAXJOG - CTRIO2 Axis Jog Mode
|
|
Related Topics:
|
|