PAM CAN Bus
PAM CAN Bus
PAM CAN Bus
TABLE OF CONTENTS
1 INTRODUCTION --------------------------------------------------------------------------------------------1-1
1 INTRODUCTION
CAN:
Controller Area Network. A network originally defined for use as a communication network for
control applications in automobiles.
CMS:
CAN based Message Specification. One of the service elements of the application layer in the
CAN Reference Model. CMS is a language that can describe how the functionality of a module
can be accessed at its CAN interface.
COB:
Communication Object. A unit of transportation in a CAN Network. Data must be sent across a
CAN Network inside a COB. There are 2032 different COB's in a CAN Network. A COB can
contain at most 8 bytes of data.
COB-ID:
Each COB is uniquely identified in a CAN Network by a number called the COB Identifier
(COB-ID). The COB-ID determines the priority of that COB for the MAC sub-layer.
REMOTE COB:
A COB whose transmission can be requested by another module.
DBT:
COB-ID Distributor. One of the service elements of the application layer in the CAN Reference
Model. It's the responsibility of the DBT to distribute COB-ID's to COB's that are used by the
CMS service element.
MAC:
Medium Access Control. One of the sub-layers of the Datalink Layer in the CAN Reference
Model that controls who gets access to the medium to send a message.
NMT:
Network Management. One of the service elements of the application layer in the CAN
Reference Model. The NMT serves to configure, initialize, and handle errors in a CAN network.
2 INTERFACE DESCRIPTION
CAN Network
pac002_a.dsf / 11.10.96
The CAN Bus interface board is mounted in an available space in the PAM Stand-alone rack,
above the power supply. Power and signal connections to PAM are made through the backpanel.
Comm
DP RAM Application
Process
low high
Dualport
Address Selectors logic
Connector to PAM
control
In/Out CAN
Connectors
Interface
Controller
Physical Memory
Interface
Firmware
Reset
Button pac004_a.dsf / 11.10.96
Suitable mating connectors are available from a number of connector manufacturers, or they may
be ordered from Atlas Copco Controls. Atlas Copco part numbers are listed in Table 2.
ATLAS COPCO ORDERING NUMBER DESCRIPTION
505.3002 9 pin D-SUB connector, male
505.3003 9 pin D-SUB connector, female
505.3020 connector shell for circular cable (quantity = 2)
NOMINAL VALUES
3 INTERFACE SOFTWARE
3.1 INTRODUCTION
This chapter describes the process of initializing and interfacing to a CAN Bus from the
perspective of the application program. Secondly, it provides definitions, syntax descriptions and
examples of routines.
3.2 INSTALLATION
Depending on which configuration and protocol is used, different Boot- and Firmware are to be
downloaded into PAM CAN Bus interface board.
Bootware file Firmware file
CAL with NMT CBAZvvvv.CAN CFAZvvvv.CAN
CAL without NMT CBAZvvvv.CAN CFBZvvvv.CAN
DeviceNet CBAZvvvv.CAN CFDZvvvv.CAN
(slave class2)
vvvv is the version (e.g. 1000 means version 1.0_00).
Firmware files are located in ..\SOCATOOL\FIRMWARE and Bootware files in
..\SOCATOOL\BOOTWARE.
You must first download bootware and then firmware.
DOWNLOAD PROCEDURES
To download Bootware:
3.3 CHANNEL
PURPOSE
The Channel Declaration establishes the operating parameters of the CAN Bus Interface during
the initialization phase of application program execution. For most applications the default values
of optional parameters should be used (see parameters description).
DECLARATION SYNTAX
CAN_CHANNEL <ChannelName> ;
[SYNCHRO_TIMEOUT = <Synchronization timeout value in ms>;]
[WATCHDOG_TIMEOUT = <Watchdog timeout value in ms>;]
[GENERATE_VARID = <YES | NO> ;]
[MAX_PRIORITY_READ = <Nb max priority successive reads> ;]
[MAX_PRIORITY_FIFO_DATA_SIZE = <Max data size in byte> ;]
[MAX_FIFO_DATA_SIZE = <Max data size in bytes> ;]
[IN_PRIORITY_FIFO_SIZE = <In priority FIFO size> ;
IN_FIFO_SIZE = <In FIFO size> ;
OUT_PRIORITY_FIFO_SIZE = <Out priority FIFO size> ;
OUT_FIFO_SIZE = <Out FIFO size> ;]
[HIGH_PRIORITY_LEVEL = <Highest priority level> ;
LOW_PRIORITY_LEVEL = <Lowest priority level> ;
LOW_LEVEL_PRIORITY_FIFO = <Lowest priority level for priority FIFO>;]
[FATAL_ERROR_VARIABLE1 = <Fatal error channel variable name for msg 1> ;]
[FATAL_ERROR_VARIABLE2 = <Fatal error channel variable name for msg 2> ;]
[FATAL_ERROR_ROUTINE = <Fatal error routine for message 1 and 2> ;]
[NODE_NAME = <Node name for first access> ;]
[BAUDRATE = <Baudrate for communication protocol> ;]
[NODE_GUARDING_TIME = <Node guarding time value in ms> ;
LIFE_TIME_FACTOR = <Life time factor> ;]
[DEF_INHIBIT_TIME = <Default Inhibit time in ms> ;]
[DEF_PRIORITY = <Default variable priority> ;]
[DEF_FORMAT_NAME = <CAL_FIXED | CAL_FREE > ;]
END_CHANNEL
PARAMETER DESCRIPTIONS
SYNCHRO_TIMEOUT (NA) [in milliseconds]
Timeout value used to wait for synchronization between PAM and the Can Bus interface through
the dualport. The default value is 10000 (10 seconds).
WATCHDOG_TIMEOUT (NA) [in milliseconds]
Timeout value used to sense a breakdown in the communications process between the PAM and
CAN Bus interface. The default value is 1000 (1second).
NODE_NAME (NA)
This parameter specifies the PAM node name for connection by name. The default name is
SocaPam.
BAUDRATE (NA) [in bits/s, 100000 or 200000 for CAL / 125000, 250000 or 500000 for DeviceNet]
Specifies the communication baudrate. The default value is 200000 (200 kbits/s).
NODE_GUARDING_TIMEOUT (NA) [in milliseconds]
For CAL only. This parameter give the node guarding time suggested to the NMT Master.
Default value is none.
LIFE_TIME_FACTOR (NA)
For CAL only. This parameter gives the node life time factor suggested to the NMT Master.
Default value is none.
DEF_INHIBIT_TIME (NA) [in milliseconds]
For CAL only. This parameter give the default inhibit time for Channel Output variables when
INHIBIT_TIME is not specified in the Channel Output variable declaration.
Inhibit time specifies minimum delay between successive transmissions of the same variable. It
provides a means to limit the communications channel bandwidth consumed by rapidly changing
event driven channel output variables.
Default value is 0.
DEF_PRIORITY (NA) [0..7]
Specified the default Channel Variable priority when PRIORITY is not specified in the Channel
Variable declaration.
Priority level specifies transmission priority requested for variable.
Default value is 7 (lowest).
DEF_FORMAT_NAME (NA) [CAL_FREE /CAL_FIXED]
For CAL only. This parameter give the default format name for CHANNEL_REFERENCE
declarations when no FORMAT_NAME is specified. Format name specifies the format used for
CHANNEL_REFERENCE names (see Channel References page 3-14).
3.3.2 FUNCTIONS
The following inquire functions available for Channel:
? ERROR
This Boolean inquire function is true if the channel is in error. The statement syntax is as
follows:
<ChannelName> ? error
EXAMPLES:
IF CAN_MyChannel ? error THEN ...
EXCEPTION CAN_MyChannel ? error SEQUENCE SEQ_MyChanelErrorHandling ;
? ERROR_CODE (BOOLEAN)
This Boolean inquire function is true if the parameter error code matches the error state of the
channel. The syntax of the statement is as follows:
<ChannelName> ? error_code(<error code>)
EXAMPLES
IF CAN_MyChannel ? error_code(CHNL_NODE_INIT_ERROR)THEN ...
EXCEPTION CAN_MyChannel ? error_code(CHNL_NODE_INIT_ERROR) SEQUENCE
....
The file CHNLERR.SYS contains a listing of the error codes and their definitions.
i It is located in ..\SOCATOOL\APPINCS.
? ERROR_CODE (NUMERICAL)
This inquire function returns the current error code of the channel. The syntax of the statement is
as follows:
<ChannelName> ? error_code
EXAMPLE
IF CAN_MyChannel ? error_code = CHNL_WATCHDOG_TIMEOUT THEN ...
RESET_ERROR_CODE (MASK)
This function reset the selected bit(s) of the current error code of the channel.
The syntax of the statement is as follows:
<ChannelName> <- reset_error_code (mask)
EXAMPLE
CAN_MyChannel <- reset_error_code(CHNL_WATCHDOG_TIMEOUT);
EXAMPLE
CAN_MyChannel <- disconnect_node;
EXAMPLE
IF CAN_MyChannel ? node_error_port = 0x0001 THEN ...
EXAMPLE
CAN_MyChannel <- reset_node_error_port(0x0001);
DECLARATION SYNTAX
CHANNEL_INPUT_VAR <identifier> ;
[{NUMBER = <Number>|
NODES_GROUP = <Group identifier>} ;]
CHANNEL = <ChannelName> ;
[PRIORITY = <Priority level> ;]
VAR = <VariableName> ;
END
<Priority level> : (NA), specifies priority level for the variable. Determines whether the variable
is placed onto the Input Priority FIFO or the Input FIFO. Default Priority
level is taken from DEF_PRIORITY in the CHANNEL declaration.
<VariableName>: (NA), name of Internal PAM Variable into which Channel Input Variable
maps.
EXAMPLE
This example maps Channel Variable “HIV_InFlag1” into the Internal Flag Variable
“LFI_Flag1”, and Channel Variable “HIV_Axis1Speed” into Internal Real Variable
“LR1_Axis1Speed”.
// Channel declaration
CAN_CHANNEL CAN_MyChannel ;
GENERATE_VARID = NO ;
END_CHANNEL
// Linked application variables
INTERNAL FLAG_VAR LFI_Flag1 ;
INTERNAL REAL_VAR LRI_Axis1Speed ;
DECLARATION SYNTAX
CHANNEL_INPUT_SET <identifier> ;
[{NUMBER = <Number>|
NODES_GROUP = <Group identifier>} ;]
CHANNEL = <ChannelName> ;
[PRIORITY = <Priority level> ;]
VARS = <VariableName[:<Bit range>]>,
{<VariableName[:<Bit range>]>} ;
END
<Priority level> : (NA), specifies priority level for the variable. Determines whether the variable
is placed onto the Input Priority FIFO or the Input FIFO. Default Priority
level is taken from DEF_PRIORITY in the CHANNEL declaration.
<VariableName> : (NA), name of Internal PAM Variables into which Channel Variable maps.
<Bit range>: (NA), indicate the bits from the Channel Variable that map into this variable. For
a FLAG_VAR only one bit, for a WORD_VAR a range of bit (Ex: 0..9).
EXAMPLE:
In the following example, the CHANNEL_INPUT_SET declaration distributes the content of
HIS_Msg among four internal variables as follows:
HIS_Msg 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0
LFI_Flag1 TRUE 1
LW1_SubCode1 14 0 0 0 0 1 1 1 0
LW1_SubCode2 75 1 0 0 1 0 1 1
LW1_SubCode3 19214 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0
DECLARATION SYNTAX
CHANNEL_OUTPUT_VAR <identifier> ;
[{NUMBER = <Number>|
NODES_GROUP = <Group identifier>} ;]
CHANNEL = <ChannelName> ;
[EVENT_DRIVEN = <YES | NO> ;]
[PRIORITY = <Priority level> ;]
[INHIBIT_TIME = <Inhibit time in ms> ;]
VAR = <VariableName> ;
END
<VariableName> : (NA), internal PAM Variable which maps into Channel Variable.
EVENT_DRIVEN = <NO>: (NA), application must update and send Channel Variable (see §3.4.5
Function p3-13).
<priority level>: (NA), specifies transmission priority requested for the variable.
Default Priority level is taken from DEF_PRIORITY in the CHANNEL
Declaration.
<inhibit time in ms>: (NA), For CAL only. Specifies minimum delay between successive
transmissions of the same variable. This parameter provides a means
to limit the communications channel bandwidth consumed by rapidly
changing event driven channel output variables). Default inhibit time
is taken from DEF_INHIBIT_TIME in the Channel declaration.
EXAMPLE
In this example, Internal Flag Variable LFO_Flag1 is mapped to Channel Variable HOV_Flag1
and Internal Real Variable LRO_Axis1Speed is mapped to Channel Variable HOV_Axis1Speed.
// Channel declaration
CAN_CHANNEL CAN_MyChannel ;
END_CHANNEL
// Linked application variables
INTERNAL FLAG_VAR LFO_Flag1 ;
INTERNAL REAL_VAR LRO_Axis1Speed ;
// Channel output variable
CHANNEL_OUTPUT_VAR HOV_Flag1 ;
CHANNEL = CAN_MyChannel;
EVENT_DRIVEN = NO ;
PRIORITY = 4 ;
VAR = LFO_Flag1 ;
END
CHANNEL_OUTPUT_VAR HOV_Axis1Speed ;
CHANNEL = CAN_MyChannel;
VAR = LRO_Axis1Speed ;
END
DECLARATION SYNTAX
CHANNEL_OUTPUT_SET <Identifier> ;
[{NUMBER = <Number>|
NODES_GROUP = <Group identifier>} ;]
{<VariableName[:<Bit range>]>} ;
[PRIORITY = <Priority level> ;]
[INHIBIT_TIME = <Inhibit time in ms> ;]
CHANNEL = <ChannelName> ;
VARS = <VariableName[:<Bit range>]>,
END
<VariableName> : (NA), name of Internal PAM Variable which maps into Channel Variable.
<Bit range>: (NA), indicate where the variable maps into the Channel Variable. For a FLAG_VAR
only one bit, for a WORD_VAR a range of bit (E.g.: 0..9).
<Inhibit time in ms>: (NA), for CAL only. Specifies minimum delay between successive
transmissions of the same variable. This parameter provides a means to
limit the communications channel bandwidth consumed by rapidly
sending channel output sets. Default inhibit time is taken from
DEF_INHIBIT_TIME in the Channel declaration.
As they are comprised of several variables, Channel Output Sets can not be event-
i driven.
EXAMPLE
In the following example, the CHANNEL_OUTPUT _SET declaration assembles the content of the
Internal Word Variables LWO_Subcode1, LWO_Subcode2, LWO_Subcode3 and Internal Flag
Variable LFO_Flag1 into CHANNEL_OUTPUT_SET HOS_Msg as illustrated in the following
table:
LFO_Flag1 TRUE 1
LWO_Subcode1 7 0 0 0 0 0 1 1 1
LWO_SubCode2 11 0 0 0 1 0 1 1
LWO_SubCode3 24648 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0
HOS_Msg 1 1 1 0 1 0 1 1 0 1 0 0 1 1 1 1
Note that the CHANNEL_OUTPUT_SET variable is the bitwise OR of all it’s components.
// Channel declaration
CAN_CHANNEL CAN_MyChannel ;
GENERATE_VARID = NO ;
END_CHANNEL
// Linked application variables
INTERNAL FLAG_VAR LFO_Flag1 ;
INTERNAL WORD_VAR LWO_SubCode1 ;
INTERNAL WORD_VAR LWO_SubCode2 ;
INTERNAL WORD_VAR LWO_SubCode3 ;
3.4.5 FUNCTION
The following function is available for Channel Output Variables:
SEND
This function is used to generate the messages to send a not event-driven output variable. The
statement syntax is as follows:
<VariableName> <- send;
EXAMPLES:
// Once you have modified a linked application variable
LWO_MyWordVar <- 245;
// You can send the channel variable
HOV_MyOutWordVar <- send;
DECLARATION SYNTAX
CHANNEL_REFERENCE <Identifier> ;
CHANNEL_VAR = <Channel var or set> ;
[FORMAT_NAME = <Format name> ;]
[COMM_ID = <communications identifier> ;]
END
<Format name>: (NA), format name CAL_FREE or CAL_FIXED (CAL). The default
format name is taken from DEF_FORMAT_NAME in the CHANNEL
declaration.
Example: How to declare 2 variables (#ID 3 and 4) for MasterA (via port0) and 2 variables( #ID
0 and 1) for MasterB (via port1).
15 10 9 0
0 3
port 0 #ID 3 => COMM_ID = 0x0003
15 10 9 0
0 4
port 0 #ID 4 => COMM_ID = 0x0004
15 10 9 0
1 0
port 1 #ID 0 => COMM_ID = 0x0400
15 10 9 0
1 1
port 1 #ID 1 => COMM_ID = 0x0401
The maximum number of Channel_Reference is 400 for CAL and 500 for
i DeviceNet.
EXAMPLE
This example creates the following linkages between external, channel and application variables:
External
CA N_CHA NNEL A pplication
(CAN Netw ork)
pac005_a.dsf / 17.10.96
EXAMPLE 1 (CAL)
External CAN_CHANNEL Application
(CAN Network)
HRF_OAx1STH
LFO_Axis1Stopped
HOS_Axis1Status
HRF_IFlg1FH2
LWO_Axis1Status
HRF_OAx1STH
pac006_a.dsf / 02.06.97
EXAMPLE 2 (DEVICENET)
External CAN_CHANNEL Application
(CAN Network)
HRF_OutAxe1StatusToHost0
LFO_Axis1Stopped
HOS_Axis1Status
HRF_InFlag1FromHost1
LWO_Axis1Status
HRF_OutAxe1StatusToHost1
pac006_b.dsf / 02.06.97
// Channel declaration
CAN_CHANNEL CAN_MyChannel ;
BAUDRATE = 200000
GENERATE_VARID = YES ;
END_CHANNEL
//Linked application variables
INTERNAL FLAG_VAR LFI_Flag1 ;
INTERNAL FLAG_VAR LFO_Axis1Stopped ;
INTERNAL WORD_VAR LWO_Axis1Status ;
// Channel input variable
CHANNEL_INPUT_VAR HIV_InFlag1 ;
CHANNEL = CAN_MyChannel;
VAR = LFI_Flag1 ;
END
// Host reference to input variable
CHANNEL_REFERENCE HRF_InFlag1FromHost0 ;
CHANNEL_VAR = HIV_InFlag1 ;
COMM_ID = 0x0001 ;
END
CHANNEL_REFERENCE HRF_InFlag1FromHost1 ;
CHANNEL_VAR = HIV_InFlag1 ;
COMM_ID = 0x0401 ;
END
// Channel output variable
CHANNEL_OUTPUT_SET HOS_Axis1Status ;
CHANNEL = CAN_MyChannel;
VARS = LFO_Axis1Stopped :15,
LWO_Axis1Status:0..14 ;
END
// Host reference to output variable
CHANNEL_REFERENCE HRF_OutAxe1StatusToHost0 ;
CHANNEL_VAR = HOS_Axis1Status ;
COMM_ID = 0x0002;
END
CHANNEL_REFERENCE HRF_OutAxe1StatusToHost1 ;
CHANNEL_VAR = HOS_Axis1Status ;
COMM_ID = 0x0402;
END
EXAMPLE
// Communication channel declaration
CAN_CHANNEL CAN_MyCALChannel ;
BAUDRATE = 200000 ;
GENERATE_VARID = NO ;
END_CHANNEL
//Linked application variables
INTERNAL WORD_VAR LWO_MyLinkedWordVariable ;
// channel output variables
CHANNEL_OUTPUT_VAR HOV_MyChannelOutputVariable ;
CHANNEL = CAN_MyChannel ;
VAR = LWO_MyLinkedWordVariable ;
END
// channel reference
CHANNEL_REFERENCE HRF_MyChaRef ;//12 characters according to CAL_FREE
CHANNEL_VAR = HOV_MyChannelOutputVariable;
END
EXAMPLE
// Communication channel declaration
CAN_CHANNEL CAN_MyCALChannel ;
BAUDRATE = 200000 ;
GENERATE_VARID = YES ;
END_CHANNEL
//Linked application variables
INTERNAL WORD_VAR LWO_MyLinkedWordOutputVariable ;
// channel output variables
CHANNEL_OUTPUT_VAR HOV_MyChannelOutputVariable ;
CHANNEL = CAN_MyChannel ;
VAR = LWO_MyLinkedWordOutputVariable ;
END
// channel reference (length is not important because without DBT
// Master, Only COMM_ID is used)
CHANNEL_REFERENCE HRF_MyChannelReference;
CHANNEL_VAR = HOV_MyChannelOutputVariable ;
COMM_ID = 4 ;
END
EXAMPLE
// Communication channel declaration
CAN_CHANNEL CAN_DevNetChannel ;
GENERATE_VARID = YES ;
BAUDRATE = 125000 ;
END_CHANNEL
// application linked variables
INTERNAL WORD_VAR LWO_MyLinkedWordOutputVariable ;
// channel output variables
CHANNEL_OUTPUT_VAR HOV_MyChannelOutputVariable ;
CHANNEL = CAN_MyChannel ;
VAR = LWO_MyLinkedWordOutputVariable ;
END
// channel reference (length is not important because with DeviceNet
// only COMM_ID is used)
CHANNEL_REFERENCE HRF_MyChannelReference;
CHANNEL_VAR = HOV_MyChannelOutputVariable ;
COMM_ID = 4 ;
END
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
Error code on
PAM Display
O O R x T N N N
31 28 27 24 23 20 19 16 15 12 11 8 7 4 3 0
PAMFatalErrorCode
O O x x x N N N
x : not used (0)
O : Origine
NNN : Error code number pac010_a.dsf / 17.10.96
Figure 7: PAMFatalErrorCode Format (see PAM V2.5 Reference Manual, appendix B for more
details).
Fatal Error
Occurs
Init
FatalError1Low
FatalError1High
FatalError2Low
FatalError2High
Is a
Execute
FatalErrorRoutine YES
FatalErrorRoutine
defined ?
NO
Is a
Construct and send
FatalErrorVariable1 YES
FatalErrorVariable1
defined ?
NO
Is a
Construct and send
FatalErrorVariable2 YES
FatalErrorVariable2
defined ?
NO
EXAMPLES
The following example uses the default setting. It means that, when a fatal error occurs in PAM,
the first message contains PAMFatalErrorCode and Field1 (D1). The second message contains
Field2 (D2) and Field3 (D3).
// Communication channel declaration
CAN_CHANNEL CAN_MyChannel ;
GENERATE_VARID = NO ; // With dynamic distribution of identifier
FATAL_ERROR_VARIABLE1 = HOS_FatalError ;// Both messages have same
FATAL_ERROR_VARIABLE2 = HOS_FatalError ;// size and same reference
END_CHANNEL
In the following example, when a fatal error occurs in PAM, the first message is send to inform
Host2 that PAM1 is in Fatal Error and a second one is send to give it the fatal error code.
// Communication channel declaration
CAN_CHANNEL CAN_MyChannel ;
GENERATE_VARID = NO ; // With dynamic distribution of identifier
FATAL_ERROR_VARIABLE1 = HOS_PAMVariable ;// Both messages have same
FATAL_ERROR_VARIABLE2 = HOS_PAMVariable ;// size and same reference
FATAL_ERROR_ROUTINE = RTN_MyFatalErrorRoutine ;
END_CHANNEL
// Application linked variables
INTERNAL WORD_VAR LWO_VariableID ;
INTERNAL WORD_VAR LWO_VariableValue ;
// Channel Output direct access message
CHANNEL_OUTPUT_SET HOS_PAMVariable ;
CHANNEL = CAN_MyChannel;
VARS = LWO_VariableID:32..39,
LWO_VariableValue:0..31 ;
END
// Host reference to Output direct access message
CHANNEL_REFERENCE HRF_OPAMVTH2 ;//Output PAM Variable To Host2
CHANNEL_VAR = HOS_PAMVariable ;
END
// Routines declaration
ROUTINES RGR_MyRoutines ;
ROUTINE RTN_MyFatalErrorRoutine ;
FatalError2High <- 0x13 ; // VariableID = PAM fatal error code
FatalError2Low <- FatalError1Low ; //Pam Fatal Error code
FatalError1High <- 0xAA ; // VariableID = PAMStatus
FatalError1Low <- 0x002457FE ; // PAM in Fatal Error
END_ROUTINES
END_ROUTINES
.......
4 EXAMPLE PROGRAMS
CHANNEL_REFERENCE HRF_InAx1MsgFromHost3 ;
CHANNEL_VAR = HIS_Axis1 ;
COMM_ID = 882 ;
END
// Channel output variable
CHANNEL_OUTPUT_VAR HOV_Axis1Position ;
CHANNEL = CAN_MyChannel;
PRIORITY = 6 ;
VAR = LRO_Axis1Position ;
END
CHANNEL_OUTPUT_VAR HOV_Axis1Speed ;
CHANNEL = CAN_MyChannel;
EVENT_DRIVEN = NO ;
VAR = LRO_Axis1Speed ;
END
// Host reference to output variable
CHANNEL_REFERENCE HRF_OutAx1SpeedToHosts ;
CHANNEL_VAR = HOV_Axis1Speed ;
COMM_ID = 661 ;
END
CHANNEL_REFERENCE HRF_OutAx1PosToHosts;
CHANNEL_VAR = HOV_Axis1Position ;
COMM_ID = 1321 ;
END
// Channel Output direct access message
CHANNEL_OUTPUT_SET HOS_Axis1 ;
CHANNEL = CAN_MyChannel;
VARS = LFO_Axis1InError:31,
LWO_Axis1Status:0..30 ;
END
// Host reference to Output direct access message
CHANNEL_REFERENCE HRF_OutAx1MsgToHosts ;
CHANNEL_VAR = HOS_Axis1 ;
COMM_ID = 1543 ;
END
// Use in application
LRO_Axis1Position <- 12.33 ; // Event if value changed
LRO_Axis1Speed <- 12.33 ; // No event generated to DP
HOV_Axis1Speed <- send ; // Manually send var. to DP
LFO_Axis1InError <- set ;
LWO_Axis1Status <- 12 ;
HOS_Axis1 <- send ; // Manually send var. to DP
Host 1
HRF_IFlg1FH1
PAM Application
CAN CHANNEL Variables
Host2
HRF_IAx1MFH2 LFI_Axis1Start
HRF_OAx1PTH LWI_Axis1Cmd
HOV_Axis1Position LRO_Axis1Position
Host3
HRF_IFlg1FH3 LFO_Axis1InError
HOS_Axis1
HRF_IAx1MFH3 LWO_AxisStatus
HRF_OAx1STH
HRF_OAx1PTH
HRF_OAx1MTH
pac009_b.dsf / 02.06.97
EVENT_DRIVEN = NO ;
VAR = LRO_Axis1Speed ;
END
// Host references to output variable
CHANNEL_REFERENCE HRF_OutAx1PosToHost0 ;
CHANNEL_VAR = HOV_Axis1Position ;
COMM_ID = 0x0003 ;
END
CHANNEL_REFERENCE HRF_OAx1SpeTHost0 ;
CHANNEL_VAR = HOV_Axis1Speed ;
COMM_ID = 0x0004 ;
END
CHANNEL_REFERENCE HRF_OutAx1PosToHost1 ;
CHANNEL_VAR = HOV_Axis1Position ;
COMM_ID = 0x0403 ;
END
CHANNEL_REFERENCE HRF_OAx1SpeTHost1 ;
CHANNEL_VAR = HOV_Axis1Speed ;
COMM_ID = 0x0404 ;
END
// Channel Output direct access message
CHANNEL_OUTPUT_SET HOS_Axis1 ;
CHANNEL = CAN_MyDevNetChannel;
VARS = LFO_Axis1InError:31,
LWO_Axis1Status:0..30 ;
END
// Host reference to Output direct access message
CHANNEL_REFERENCE HRF_OutAx1MsgToHost0 ;
CHANNEL_VAR = HOS_Axis1 ;
COMM_ID = 0x05 ;
END
CHANNEL_REFERENCE HRF_OutAx1MsgToHost1 ;
CHANNEL_VAR = HOS_Axis1 ;
COMM_ID = 0x405 ;
END
// Use in application
LRO_Axis1Position <- 12.33 ; // Event if value changed
LRO_Axis1Speed <- 12.33 ; // No event generated to DP
HOV_Axis1Speed <- send ; // Manually send var. to DP
LFO_Axis1InError <- set ;
LWO_Axis1Status <- 12 ;
HOS_Axis1 <- send ; // Manually send var. to DP
PAM Application
CAN CHANNEL Variables
Host0
HRF_IMAx1FH0 LFI_Axis1Start
HRF_OAx1PTH0 LWI_Axis1Cmd
HOV_Axis1Position LRO_Axis1Position
Host1
HRF_IFlg1FH1 LFO_Axis1InError
HOS_Axis1
HRF_IMAx1FH1 LWO_AxisStatus
HRF_OAx1STH1
HRF_OAx1PTH1
HRF_OMAx1TH1
pac011_a.dsf / 26.05.97