System bus (CAN) with Servo PLC & Drive PLC
LenzeCanDrv.lib - Function blocks
9.1
Transmit CAN object (L_CanPdoTransmit)
9-1
L
PLC-Systembus EN 1.1
9
Function blocks
9.1
Transmit CAN object (L_CanPdoTransmit)
This function block is used to transmit data via the system bus interface according to CANopen.
•
The operating system of the controller sends data and executes the PLC program at the
same time, this is why an object can be transmitted only every 250
µ
s.
L_CanPdoTransmit
wDrvNr
byLen
dwCobId
pIOAdress
tRepeatTime
byTransmitMode
nState
wNrOfCallsToSend
Fig. 9-1
Transmit CAN object (L_CanPdoTransmit)
Identifier
Data type
Type of variable Possible settings
Info
wDrvNr
Word
VAR_INPUT
10
11
System bus
FIF CAN
byLen
Byte
VAR_INPUT
0 ... 8
Telegram length (in bytes)
dwCobID
Double word
VAR_INPUT
0 ... 2047
CAN identifier
pIOAdress
Pointer to byte
VAR_INPUT
Pointer positioned over the
memory address from which
data bytes are to be sent.
Use the
ADR
address function to ascertain the
address of a variable.
tRepeatTime
Time
VAR_INPUT
T#0s
T#xms
Parameter for time-controlled transmission
(
byTransmitMode
= 1/2)
•
Data is transmitted whenever the FB is called.
•
Data is transmitted after expiry of the set
cycle time x (in ms).
byTransmitMode
Byte
VAR_INPUT
0
Event-controlled transmission
•
Data is transmitted when input data has
changed.
•
When the bus status changes from
pre-operational
to
operational
the telegram is
always transmitted once.
1
Time-controlled transmission
•
Data is transmitted after expiry of the cycle
time set under
tRepeatTime
.
2
Time-controlled transmission
with an overlapping event control
•
Data is transmitted after expiry of the cycle
time set under
tRepeatTime
and whenever
transmission data has changed.
3
Forced transmission
•
Data is transmitted whenever the command
<instance name>.
SendData
is
called, independent of the set cycle time.
Show/Hide Bookmarks