2 sm_can.lib, Sm_can.lib, L-force | plc designer - softmotion – Lenze PLC Designer PLC-Designer (R2-x) SoftMotion User Manual
Page 54

L-force | PLC Designer - SoftMotion
The SoftMotion drive interface
Drive element
54
L
DMS 5.2 EN 03/2011 TD17
3.3.2
SM_CAN.lib
For each CAN drive connected an individual driver is required.
However, if this is set in the cfg file, the baud rate and the number of the CAN controller
(starting with 0) can be defined for all CAN drives in the control configuration under the
axis group dialog. In order to keep the bus deterministic, either I/Os or drives, but never
both at the same time, are operated for each CAN channel. If the 3S-CANopen library is
used, it automatically takes the first CAN controllers, and thus a different one can be
reserved for the axis group.
All CAN libraries created by 3S are based on the SM_CAN.lib library. It contains two
blocks which are practical for the user, as they can be used in a simple way to read out
or write parameters of the drive: SMC_ReadCANParameter and
SMC_WriteCANParameter. With regard to their operating mode they are similar to the
blocks MC_ReadParameter and MC_WriteParameter:
Input/output (VAR_IN_OUT)
Axis : AXIS_REF (VAR_IN_OUT)
Drive the parameter of which is to be read out/written.
Inputs (VAR_INPUT)
Enable : BOOL
TRUE: parameter is read continuously.
Execute : BOOL
Rising edge: one-time writing of parameter is activated.
wIndex, bySubIndex : BYTE
Index and subindex of the parameter that is to be read or written.