MLGearInitInitializes a Gear Pipe Block for use in a PLC"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events Program. FunctionA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. block is automatically called if a Gear Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.
The Pipe Block is assigned a Name, Ratio, Offset, and Slopes for changes in Ratio and Offset values. You can also choose between Modulo or Not modulo mode. Slopes set the limit at which step changes in Ratio and Offset are implemented.
The output of a Gear Block = Input value * Ratio + Offset
Be sure to set RatioSlope < (Ratio * EtherCATEtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs Update Rate). The Gear block will make a jump (without a ramp) from one gear to the next when the RatioSlope is greater than the Ratio change factor multiplied by the update rate scale factor.
Gear objects are normally created in the Pipe Network using the graphical engine. Then you do not have to add MLGearInit function blocks to their programs. Parameters are entered directly in pop-up windows, and the code is then automatically added to the current project.
|
BlockID |
Description |
ID number of a created Pipe Block |
|
Data type |
DINT |
|
|
Range |
[-2147483648, 2147483648] |
|
|
Unit |
n/a |
|
|
Default |
GEAR |
|
|
Ratio |
Description |
Ratio of new Gear Pipe Block. Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8) |
|
Data type |
LREAL |
|
|
Range |
— |
|
|
Unit |
n/a |
|
|
Default |
1.0 |
|
|
Offset |
Description |
Offset of new Gear Pipe Block. Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8) |
|
Data type |
LREAL |
|
|
Range |
— |
|
|
Unit |
n/a |
|
|
Default |
0.0 |
|
|
UseUserRatioSlope |
Description |
FALSE to use the maximum Slope, causing an instantaneous gear change within one cycle. TRUE to use user-defined RatioSlope |
|
Data type |
BOOL |
|
|
Range |
0, 1 |
|
|
Unit |
n/a |
|
|
Default |
FALSE |
|
|
RatioSlope |
Description |
User-defined limit at which step changes in Ratio are implemented. Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8) |
|
Data type |
LREAL |
|
|
Range |
— |
|
|
Unit |
1/sec |
|
|
Default |
0.0 |
|
|
UseUserOffsetSlope |
Description |
FALSE to use the maximum Slope, causing an instantaneous gear change within one cycle. TRUE to use user-defined OffsetSlope |
|
Data type |
BOOL |
|
|
Range |
0, 1 |
|
|
Unit |
n/a |
|
|
Default |
FALSE |
|
|
OffsetSlope |
Description |
User-defined limit at which step changes in Offset are implemented. Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8) |
|
Data type |
LREAL |
|
|
Range |
— |
|
|
Unit |
User unit/sec |
|
|
Default |
0.0 |
|
|
Modulo |
Description |
TRUE when mode is modulo. Modulo mode adapts the output values according to the ModuloPosition (modulo) |
|
Data type |
BOOL |
|
|
Range |
0, 1 |
|
|
Unit |
n/a |
|
|
Default |
FALSE |
|
Default (.Q) |
Description |
Returns TRUE if the Gear Pipe Block is initialized See more details here |
|
Data type |
BOOL |
|
|
Unit |
n/a |
BOOL
//Initialize a Gear Pipe Block named GEAR1 with:
// Ratio = 1,Offset = 0, User Ratio Slope OFF, User Ratio
// Slope = 0, Offset Slope = 0, and no Modulo
GEAR1 := MLBlkCreate( 'GEAR1', 'GEAR' );
MLGearInit( GEAR1, 1.0, 0.0, false, 0.0, false, 0.0, false);
|
Copyright © 2015 Kollmorgen™ |
|