Danfoss MCO 305 Design Manual page 187

Programmable motion controller
Hide thumbs Also See for MCO 305:
Table of Contents

Advertisement

MCO 305 Design Guide
The following functions handle buffered transfer:
Command
Description
INGLB
reads Glb CAN message
INMSG
reads CAN message (polling)
MSGVAL
supplies the long value of the last
message
ON CANINPUT
calls up a subprogram when a CAN
telegram type 'id' arrives
OUTMSG
sends CAN message (polling)
USRSTAT
sets user status
SDO2
A second SDO is supported to communicate with debug devices like SDO monitors.
This second SDO uses the following CobId:
SDO2-Tx = 0x681 – 0x6FF
SDO2-Rx = 0x101 – 0x1FF
To enable the use of SDO2, you must first write the above addresses to the Objects
ServerSdo2Parameters - Index 0x1201 Subindex 0x01 (CobId Rx) and 0x02 (CobId Tx).
If you read these parameters, then you will get the above mentioned CobIds with the highest bit set. This
bit is the NOT_VALID bit.
It is not possible to change these CobIds; you only can overwrite them with the same value with the
NOT_VALID bit set to zero.
It is possible to disable these SDO's again by resetting the NOT_VALID bit.
Using SDO2 does not need extra objects in CAN-Memory. Receiving is done by the universal Rx-Mailbox.
Transmitting is also done by the universal Tx-Mailbox.
This enabling or disabling could also be done from within the APOSS program:
SDO2_txid = 0x680 + (get CANNR)
SDO2_rxid = 0x100 + (get CANNR)
COB_NOT_VALID = 0x80000000
// enable SDO2
sysvar[0x01120101] = SDO2_txid
sysvar[0x01120102] = SDO2_rxid
// disable SDO2
sysvar[0x01120101] = (SDO2_txid | COB_NOT_VALID)
sysvar[0x01120102] = (SDO2_rxid | COB_NOT_VALID)
__ How to Program __
Syntax
res = INGLB (p)
intval = INMSG
longval = MSGVAL
ON CANINPUT id
OUTMSG intval
USRSTAT val
®
MG.33.L5.02 – VLT
is a registered Danfoss trademark
Parameter
p = time-out, defined . . .
0 = waits until a message
arrives
> 0 = waits a maximum of p
milliseconds
0 = no wait for a message
timeout =
timeout
< 0 = does not wait for data
0 = waits until data arrives
> 0 = waits for data in timeout
[ms]
id = 0
GOSUB name
name = name of the subroutine
intval = bytes 2 and 3 of the
longval
CAN-message
longval = bytes 4 and 7 of the
CAN-message
val = value to be set
187

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents