SBC CAN-Functions on Classic PCDs Owner's manual

Type
Owner's manual
Document 26-839 ā”‚ Edition ENG05 ā”‚ 2019-05-27
Manual
CAN-Functions on PCD2.M5_ & PCD3
CPU Serie Classic
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Content
0-1
0
0 Content
0.1 Document History .................................................................................. 0-3
0.2 About this manual .................................................................................. 0-3
0.3 Brands and trademarks ........................................................................ 0-3
1 Introduction
1.1ī€ƒ CAN2.0ī€ƒSpeciī‚æcationī€ƒ(Dataī€ƒLinkī€ƒLayer) ................................................ 1-3
1.2 Properties .............................................................................................. 1-3
1.3 Frame types ........................................................................................... 1-5
1.4ī€ƒ Messageī€ƒacceptanceī€ƒī‚æltering ................................................................ 1-6
2 Hardware
2.1 Communication interfaces .................................................................... 2-1
2.1.1 For the PCD3.M6240, PCD3.M6340 and PCD3.M6360 ....................... 2-1
2.1.2 CAN bus attachment, module PCD7.F7400 for the PCD2.M5x40 ........ 2-2
2.2 CAN Connection ................................................................................... 2-3
2.2.1 Pin signal description ............................................................................. 2-3
2.2.2 Connections and cabling ....................................................................... 2-3
2.2.3 Maximum distance of the network ......................................................... 2-4
2.2.4 Shielding ................................................................................................ 2-4
2.3 Port ID Table for CAN Interfaces ........................................................... 2-4
3 Function
3.1 General .................................................................................................. 3-1
3.2 CAN Direct Access ................................................................................ 3-3
3.2.1 General .................................................................................................. 3-3
3.2.2 Polling vs interrupts ............................................................................... 3-3
3.2.3 Remote transmission requests RTR ...................................................... 3-3
3.2.4 Initialisation sequence ........................................................................... 3-3
3.2.5 Self-received frames .............................................................................. 3-3
3.3 CAN Basic Services............................................................................... 3-4
3.3.1 General .................................................................................................. 3-4
3.3.2 Remote transmission requests RTR ...................................................... 3-4
3.3.3 Initialisation sequence ........................................................................... 3-4
3.4 CAN Data Mapping ................................................................................ 3-5
3.4.1 General .................................................................................................. 3-5
3.4.2 CAN process image ............................................................................... 3-5
3.4.3ī€ƒ Conī‚æguration ......................................................................................... 3-5
3.4.4 Data transfer .......................................................................................... 3-6
3.4.5 Remote transmission requests RTR ...................................................... 3-6
3.4.6 Initialisation sequence ........................................................................... 3-6
3.5ī€ƒ Simultaneousī€ƒuseī€ƒofī€ƒdiļ‚‡erentī€ƒoperatingī€ƒmodes .................................... 3-7
3.5.1 General .................................................................................................. 3-7
3.5.2 Priorities ................................................................................................. 3-7
3.5.3 Reception .............................................................................................. 3-7
3.5.4 Transmission ......................................................................................... 3-7
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Content
0-2
0
4ī€ƒ Conī‚ægurationī€ƒandī€ƒProgramming
4.1 System Functions .................................................................................. 4-1
4.1.1 Polling vs interrupts ............................................................................... 4-2
4.1.2ī€ƒ Conī‚æguration ......................................................................................... 4-2
4.1.3 Initialisation sequence ........................................................................... 4-3
4.1.4 Overview operating options ................................................................... 4-3
4.1.5ī€ƒ PLCī€ƒStates............................................................................................. 4-3
4.2 User interface ........................................................................................ 4-4
4.2.1 General .................................................................................................. 4-4
4.2.2 Data Registers ....................................................................................... 4-6
4.2.3 CAN Direct Access ................................................................................ 4-7
4.2.4 CAN Basic Services............................................................................... 4-12
4.2.5 CAN Data Mapping ................................................................................ 4-15
4.3ī€ƒ Conī‚æguration ......................................................................................... 4-16
4.3.1ī€ƒ Startingī€ƒtheī€ƒConī‚ægurator ....................................................................... 4-16
4.3.2 Data Mapping ........................................................................................ 4-17
4.4ī€ƒ Programmingī€ƒmodelī€ƒ(CANī€ƒDirectī€ƒAccess)............................................. 4-18
4.4.1 Transmission ......................................................................................... 4-18
4.4.2 Reception .............................................................................................. 4-19
A Appendix
A.1 Icons ...................................................................................................... A-1
A.2 Contact ................................................................................................. A-2
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Content
0-3
0
0.1ī€ƒ Documentī€ƒHistory
Date Version Changesī€ƒ/ī€ƒRemarks
2005-12-15 EN01 Published Edition
2009-09-09 EN02 Modiī‚æcationsī€ƒforī€ƒPCD2.M5_
2013-09-30 EN03 Newī€ƒLogoī€ƒandī€ƒnewī€ƒcompanyī€ƒname
2014-06-20 EN04 3 types of PCD3 with CAN
2019-05-27 ENG05 Newī€ƒphoneī€ƒnumber:ī€ƒ(2015-02-15)
0.2ī€ƒ Aboutī€ƒthisī€ƒmanual
See the section in the appendix in relation to some of the terms, abbreviations and
the references used in this manual.
0.3ī€ƒ Brandsī€ƒandī€ƒtrademarksī€ƒ
Saia PCD
Ā®
and Saia PG5
Ā®
are registered trademarks of Saia-Burgess Controls AG.
Technicalī€ƒmodiī‚æcationsī€ƒareī€ƒbasedī€ƒonī€ƒtheī€ƒcurrentī€ƒstate-of-the-artī€ƒtechnology.ī€ƒ
Saia-Burgess Controls AG, 2005.
Ā©
All rights reserved.
Published in Switzerland
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-1
1
CAN2.0ī€ƒSpeciī‚æcationī€ƒ(Dataī€ƒLinkī€ƒLayer)/Properties
1 Introduction
This document gives an introduction and general description of the Saia PCD
Ā®
with
CANī€ƒinterface,ī€ƒasī€ƒwellī€ƒasī€ƒtheī€ƒspeciī‚æcī€ƒfunctionsī€ƒofī€ƒtheī€ƒClassicī€ƒuserī€ƒinterface.ī€ƒTheī€ƒ
Hardware as well as the basic functionality is explained. Two systems are provided: a
Classic version and a xx7 version.
Theī€ƒprovidedī€ƒCANī€ƒfunctionalityī€ƒisī€ƒaī€ƒLayer-2ī€ƒinterface.ī€ƒTheī€ƒuserī€ƒisī€ƒgivenī€ƒaī€ƒchoiceī€ƒofī€ƒ
severalī€ƒoperatingī€ƒmodesī€ƒprovidingī€ƒdiļ‚‡erentī€ƒlevelsī€ƒofī€ƒcomfortī€ƒandī€ƒfunctionality.ī€ƒAllī€ƒ
functionality is accessed with System Functions by the user.
The CAN interface does not provide any CANopen functionality. However it is possi-
bleī€ƒtoī€ƒaccessī€ƒtoī€ƒsimplerī€ƒCANopenī€ƒslavesī€ƒthroughī€ƒtheī€ƒgivenī€ƒLayer-2ī€ƒinterface.ī€ƒThisī€ƒre-
quires the user to implement all the relevant CANopen messages himself in the user
programī€ƒusingī€ƒtheī€ƒprovidedī€ƒLayer-2ī€ƒinterface.
There are three types of PCD3 with CAN-bus. The two types PCD3.M6240 and
PCD3.M6340 are no longer fabricated. They were replaced with the PCD3.M6360,
which is faster and has more storage capacity.
Forī€ƒtheī€ƒPCD2.M5x40ī€ƒweī€ƒoļ‚‡erī€ƒtheī€ƒcardī€ƒPCD7.F7400.
These three PCD3s with CAN-fonction as well as the card PCD7.F2400 are OEM-
products and appear neither in the system catalogue nor in the price list.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-2
1
CAN2.0ī€ƒSpeciī‚æcationī€ƒ(Dataī€ƒLinkī€ƒLayer)/Properties
Overviewī€ƒofī€ƒtheī€ƒPCD3-typesī€ƒwithī€ƒCAN-fonction:
Technicalī€ƒdataī€ƒCPUs
PCD3.M6240ī€ƒ PCD3.M6340ī€ƒ PCD3.M6360ī€ƒ
CAN
Numberī€ƒofī€ƒinputs/outputs
orī€ƒI/Oī€ƒmoduleī€ƒslots
1023
64
Expansion connection
yes
Processing time [Āµs] ā–  bit operation
ā–  word operation
0.3ā€¦1.5 Āµs
0.9 Āµs
0.1ā€¦0.8 Āµs
0.3 Āµs
Integrated Web server + USB +
Date-timeī€ƒ(RTC)
yes
On-boardī€ƒmemoryī€ƒ
Userī€ƒmemoryī€ƒ(RAM)ī€ƒ
1ī€ƒMByteā€Š 2ī€ƒMBī€ƒprog.ī€ƒ+ī€ƒ1ī€ƒMBī€ƒtext/
DB
(īƒ€ashī€ƒmemory)ī€ƒ
Backupī€ƒmemoryī€ƒīƒ€ashī€ƒ
1ī€ƒMByteī€ƒ(onī€ƒboard)ā€Š
Flashī€ƒī‚æleī€ƒsystemī€ƒ
- 16 MByte
Data backup
1ā€¦3ī€ƒyearsī€ƒwithī€ƒLithiumī€ƒbattery
Optionalī€ƒmemoryī€ƒ up to 4 GByte
On-boardī€ƒdataī€ƒinterfaces 4ā€¦5
RS-485ī€ƒonī€ƒterminalī€ƒblockī€ƒ(Proī‚æbus-DPī€ƒ
slave,ī€ƒProī‚æ-S-Netī€ƒ(S-IO,ī€ƒS-Bus))
upī€ƒtoī€ƒ115.2ī€ƒkBit/sī€ƒorī€ƒ
Proī‚æ-S-Netī€ƒupī€ƒtoī€ƒ187.5ī€ƒkBit/s
USB 1.1
no yes
Ethernet-TCP/IPī€ƒī€ƒ10/100ī€ƒMBit/s
yes
RS-232ī€ƒupī€ƒtoī€ƒ115.2ī€ƒkBit/s
yesī€ƒ(onī€ƒD-Sub)
RS-422/RS-485ī€ƒonī€ƒPortī€ƒ#3
no
Proī‚æbus-DPī€ƒslave,ī€ƒProī‚æ-S-Netī€ƒ
(S-IO,ī€ƒS-Bus),ī€ƒupī€ƒtoī€ƒ1.5MBit/sī€ƒ
no
Controllerī€ƒAreaī€ƒNetworkī€ƒ(CANī€ƒ2.0B)
yesī€ƒ(onī€ƒD-Sub)
Profibus-DPī€ƒMasterī€ƒupī€ƒtoī€ƒ12ī€ƒMBit/s
no
Optionalī€ƒdataī€ƒinterfaces Up to 8
Optionalī€ƒPCD3.F1xxā€Šmodulesī€ƒforī€ƒ
RS-232, RS-485, RS-422, TTY/20ī€ƒmA
and Belimo MP-Bus
onlyī€ƒSlotī€ƒ#0ī€ƒ
Optionalī€ƒPCD3.F2xxā€Šmodulesī€ƒforī€ƒ
RS-232, RS-485, RS-422, TTY/20ī€ƒmA
and Belimo MP-Bus
Slotī€ƒ#0ā€¦3ī€ƒupī€ƒtoī€ƒ8ī€ƒports
General
Supply voltage
(accordingī€ƒtoī€ƒEN/IEC61131-2)
24ī€ƒVDCī€ƒ/ī€ƒĖ—20/+25ī€ƒ%ī€ƒmax.incl.ī€ƒ5ī€ƒ%ī€ƒripple
Capacityī€ƒ5ī€ƒV/24ī€ƒVī€ƒintern
max.ī€ƒ600ī€ƒmA/100ī€ƒmA
Programmable
from PG5
Version $1.3.100
from PG5
Version $2.0.136
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-3
1
Frame types
1.1ī€ƒ CAN2.0ī€ƒSpeciī‚æcationī€ƒ(Dataī€ƒLinkī€ƒLayer)
Theī€ƒControllerī€ƒAreaī€ƒNetworkī€ƒ(CAN)ī€ƒisī€ƒaī€ƒserialī€ƒcommunicationsī€ƒprotocolī€ƒwhichī€ƒef-
ī‚æcientlyī€ƒsupportsī€ƒdistributedī€ƒreal-timeī€ƒcontrolī€ƒwithī€ƒaī€ƒveryī€ƒhighī€ƒlevelī€ƒofī€ƒsecurity.ī€ƒThisī€ƒ
chapterī€ƒgivesī€ƒaī€ƒshortī€ƒsummaryī€ƒofī€ƒtheī€ƒmostī€ƒrelevantī€ƒfeaturesī€ƒdeī‚ænedī€ƒinī€ƒtheī€ƒCANī€ƒ
speciī‚æcation.ī€ƒForī€ƒmoreī€ƒdetailsī€ƒtoī€ƒanyī€ƒsubjectī€ƒpleaseī€ƒreferī€ƒtoī€ƒwww.can-cia.org.
Theī€ƒCANī€ƒspeciī‚æcationī€ƒisī€ƒdividedī€ƒinī€ƒtwoī€ƒparts:ī€ƒpartī€ƒAī€ƒandī€ƒpartī€ƒBī€ƒwhereī€ƒpartī€ƒBī€ƒdoesī€ƒ
alsoī€ƒincludeī€ƒandī€ƒsupportī€ƒallī€ƒfeaturesī€ƒofī€ƒpartī€ƒA.ī€ƒTheī€ƒmostī€ƒimportantī€ƒdiļ‚‡erenceī€ƒbetweenī€ƒ
theī€ƒtwoī€ƒpartsī€ƒconcernsī€ƒtheī€ƒformatī€ƒofī€ƒtheī€ƒmessageī€ƒidentiī‚æer
Speciī‚æcation Message ID format
CAN2.0 A Standard 11 bits
CAN2.0 B Extended 29 Bits
Messages in both formats can coexist on the same network.
CAN implementations that are designed according to part A, and CAN implementa-
tionsī€ƒthatī€ƒareī€ƒdesignedī€ƒaccordingī€ƒtoī€ƒpartī€ƒBī€ƒofī€ƒtheī€ƒCAN2.0ī€ƒspeciī‚æcationī€ƒcanī€ƒcommuni-
cate with each other as long as it made no use of the extended format.
1.2ī€ƒ Properties
Messageī€ƒproperties
Informationī€ƒonī€ƒtheī€ƒbusī€ƒisī€ƒsentī€ƒinī€ƒī‚æxedī€ƒformatī€ƒmessagesī€ƒofī€ƒdiļ‚‡erentī€ƒlength.ī€ƒCANī€ƒsup-
ports messages of up to 8 bytes data. Standard end extended message ID formats
are possible.
Busī€ƒproperties
Theī€ƒCANī€ƒbusī€ƒsupportsī€ƒbitī€ƒratesī€ƒofī€ƒupī€ƒtoī€ƒ1ī€ƒMBit/s.ī€ƒDiļ‚‡erentī€ƒbitī€ƒratesī€ƒfromī€ƒ10ī€ƒkBit/sī€ƒtoī€ƒ
1ī€ƒMBit/sī€ƒareī€ƒrecommendedī€ƒwhileī€ƒtheī€ƒsupportī€ƒforī€ƒ20ī€ƒkBit/sī€ƒisī€ƒmandatory.
Theī€ƒCANī€ƒspeciī‚æcationī€ƒprescribesī€ƒseveralī€ƒerrorī€ƒdetectionī€ƒmechanisms.ī€ƒErrorī€ƒcoun-
ters and indicators allow a permanent control of the bus condition. Defect nodes are
automaticallyī€ƒswitchedī€ƒoļ‚‡.
Informationī€ƒrouting
Aī€ƒCANī€ƒnodeī€ƒdoesī€ƒnotī€ƒmakeī€ƒuseī€ƒofī€ƒanyī€ƒinformationī€ƒaboutī€ƒtheī€ƒsystemī€ƒconī‚æguration.ī€ƒ
Forī€ƒinstance,ī€ƒnoī€ƒexplicitī€ƒstationī€ƒaddressesī€ƒareī€ƒdeī‚æned.
Theī€ƒidentiī‚æerī€ƒofī€ƒaī€ƒmessageī€ƒdoesī€ƒnotī€ƒindicateī€ƒtheī€ƒdestinationī€ƒofī€ƒtheī€ƒmessageī€ƒbutī€ƒ
describesī€ƒtheī€ƒmeaningī€ƒofī€ƒtheī€ƒdata.ī€ƒThus,ī€ƒeveryī€ƒnodeī€ƒcanī€ƒdecideī€ƒbyī€ƒmessageī€ƒī‚ælteringī€ƒ
whether the received data requires any action or not.
This mechanism allows multicast reception with time synchronization.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-4
1
Messageī€ƒacceptanceī€ƒī‚æltering
Priorisationī€ƒandī€ƒarbitration
Theī€ƒprioritiesī€ƒofī€ƒmessagesī€ƒareī€ƒdeī‚ænedī€ƒbyī€ƒtheirī€ƒidentiī‚æer.ī€ƒMessagesī€ƒwithī€ƒlowerī€ƒidenti-
ī‚æerī€ƒhaveī€ƒhigherī€ƒpriority.
Any connected unit may start to transmit a message whenever the bus is idle. If 2
orī€ƒmoreī€ƒunitsī€ƒstartī€ƒtransmittingī€ƒmessagesī€ƒatī€ƒtheī€ƒsameī€ƒtime,ī€ƒtheī€ƒbusī€ƒaccessī€ƒconīƒ€ictī€ƒ
isī€ƒresolvedī€ƒbyī€ƒbitwiseī€ƒarbitrationī€ƒusingī€ƒtheī€ƒmessageī€ƒidentiī‚æer.ī€ƒTheī€ƒmechanismī€ƒofī€ƒarbi-
tration guarantees that neither information nor time is lost.
Aī€ƒdataī€ƒframeī€ƒprevailsī€ƒoverī€ƒaī€ƒremoteī€ƒframeī€ƒ(RTR).ī€ƒIfī€ƒaī€ƒtransmittedī€ƒmessageī€ƒisī€ƒcor-
rupted, an automatic retransmission will take place according to the message priority.
Bitī€ƒtiming
The nominal bit time is divided into separate non-overlapping time segments. The
length of each segment is described in so-called time quanta units. The chosen divi-
sion of one bit time into time quanta is directly related to the generation of the bit rate.
Theī€ƒratioī€ƒbetweenī€ƒtheī€ƒdiļ‚‡erentī€ƒtimeī€ƒsegmentsī€ƒdeī‚ænesī€ƒtheī€ƒsampleī€ƒpointī€ƒofī€ƒoneī€ƒbit.ī€ƒ
Theī€ƒcorrectī€ƒdeī‚ænitionī€ƒofī€ƒtheī€ƒsampleī€ƒpointī€ƒdependsī€ƒonī€ƒtheī€ƒnetworkī€ƒtopology.ī€ƒTheī€ƒposi-
tion of the sample point should be the same for all devices connected to the same
network.
Theī€ƒdiļ‚‡erentī€ƒsegmentsī€ƒareī€ƒdeī‚ænedī€ƒasī€ƒfollows:
Nominal Bit Time
SYNC_SEG PROP_SEG PHASE_SEG1 PHASE_SEG2
Sample Point
Segment Length
SYNC_SEGī€ƒ ī€ƒ ī€ƒ 1ī€ƒTIMEī€ƒQUANTUM
PROP_SEGī€ƒ ī€ƒ ī€ƒ 1,2,...,8ī€ƒTIMEī€ƒQUANTA
PHASE_SEG1ī€ƒ ī€ƒ 1,2,...,8ī€ƒTIMEī€ƒQUANTA
PHASE_SEG2ī€ƒ ī€ƒ maxī€ƒ(PHASE_SEG1;ī€ƒInformationī€ƒProcessingī€ƒTime)
INFORMATIONī€ƒī€ƒ ī€ƒ <=ī€ƒī€ƒ2ī€ƒTIMEī€ƒQUANTA
PROCESSING TIME
Timeī€ƒSegmentī€ƒ1
The sum of the propagation and phase segment 1 is commonly denoted as Time
Segmentī€ƒ1ī€ƒandī€ƒisī€ƒusedī€ƒinī€ƒmanyī€ƒCANī€ƒcontrollersī€ƒforī€ƒconī‚ægurationī€ƒofī€ƒtheī€ƒbitī€ƒtiming.ī€ƒ
Theī€ƒpropagationī€ƒandī€ƒphaseī€ƒsegmentī€ƒ1ī€ƒcanī€ƒthenī€ƒnotī€ƒbeī€ƒconī‚æguredī€ƒseparatelyī€ƒany-
more. However, this is not required anyway since the sample point is located between
the two phase segments.
TIME_SEG1ī€ƒ=ī€ƒPROP_SEGī€ƒ+ī€ƒPHASE_SEG1ī€ƒ
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-5
1
Messageī€ƒacceptanceī€ƒī‚æltering
1.3ī€ƒ Frameī€ƒtypes
Dataī€ƒframe
Aī€ƒdataī€ƒframeī€ƒconsistsī€ƒofī€ƒseveralī€ƒī‚æxedī€ƒformatī€ƒī‚æeldsī€ƒandī€ƒupī€ƒtoī€ƒ8ī€ƒbytesī€ƒdata.ī€ƒTheī€ƒfollow-
ing image gives an overview of the data frame format.
A data frame can be sent by any node at any time. The transmission is dependent on
the arbitration process.
Remoteī€ƒframe
By sending a remote frame a node requiring data may request another node to send
theī€ƒcorrespondingī€ƒdataī€ƒframeī€ƒ(Remoteī€ƒTransmissionī€ƒRequest,ī€ƒRTR).ī€ƒTheī€ƒdataī€ƒframeī€ƒ
andī€ƒtheī€ƒcorrespondingī€ƒremoteī€ƒframeī€ƒareī€ƒnamedī€ƒbyī€ƒtheī€ƒsameī€ƒmessageī€ƒidentiī‚æer.
Theī€ƒpolarityī€ƒofī€ƒtheī€ƒRTRī€ƒbitī€ƒinī€ƒtheī€ƒarbitrationī€ƒī‚æeldī€ƒindicatesī€ƒwhetherī€ƒaī€ƒtransmittedī€ƒ
frame is a data frame or a remote frame. A remote frame contains no data.
Identiī‚æer
Theī€ƒfollowingī€ƒimageī€ƒshowsī€ƒtheī€ƒdiļ‚‡erentī€ƒbitsī€ƒwithinī€ƒtheī€ƒarbitrationī€ƒī‚æeldī€ƒ(includingī€ƒtheī€ƒ
messageī€ƒidentiī‚æer).ī€ƒItī€ƒcontainsī€ƒtheī€ƒIDE-bitī€ƒindicatingī€ƒtheī€ƒformatī€ƒofī€ƒtheī€ƒidentiī‚æerī€ƒandī€ƒ
the RTR bit indicating the frame type.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Introduction
1-6
1
Messageī€ƒacceptanceī€ƒī‚æltering
1.4ī€ƒ Messageī€ƒacceptanceī€ƒī‚æltering
Everyī€ƒCANī€ƒnodeī€ƒimplementsī€ƒaī€ƒmessageī€ƒacceptanceī€ƒī‚ælteringī€ƒmechanismī€ƒthatī€ƒallowsī€ƒ
receivingī€ƒonlyī€ƒaī€ƒdeī‚ænedī€ƒrangeī€ƒofī€ƒmessageī€ƒidentiī‚æersī€ƒwhileī€ƒexcludingī€ƒtheī€ƒreceptionī€ƒofī€ƒ
anyī€ƒmessageī€ƒidentiī‚æersī€ƒoutsideī€ƒofī€ƒthisī€ƒrange.ī€ƒDependingī€ƒonī€ƒtheī€ƒusedī€ƒCANī€ƒcontroller,ī€ƒ
severalī€ƒrangesī€ƒmayī€ƒbeī€ƒdeī‚æned.
Theī€ƒī‚ælteringī€ƒisī€ƒbasedī€ƒonī€ƒtheī€ƒuseī€ƒofī€ƒaī€ƒconī‚æguredī€ƒidentiī‚æerī€ƒandī€ƒaī€ƒī‚ælterī€ƒmask.ī€ƒAī€ƒmes-
sageī€ƒisī€ƒacceptedī€ƒforī€ƒreceptionī€ƒintoī€ƒtheī€ƒbuļ‚‡erī€ƒifī€ƒtheī€ƒfollowingī€ƒconditionī€ƒisī€ƒtrue:
(Receivedī€ƒMsgIDī€ƒXORī€ƒConī‚æguredī€ƒMsgID)ī€ƒAND Mask = 0
Twoī€ƒspecialī€ƒcasesī€ƒcanī€ƒbeī€ƒderivedī€ƒfromī€ƒthisī€ƒconditionī€ƒ(exampleī€ƒforī€ƒstandardī€ƒ11ī€ƒbitī€ƒ
identiī‚æers):
Mask Condition
0x000 Any message ID is accepted for reception
0x7FFī€ƒ Onlyī€ƒtheī€ƒconī‚æguredī€ƒmessageī€ƒIDī€ƒisī€ƒacceptedī€ƒforī€ƒreception
Inī€ƒtheī€ƒgeneralī€ƒcaseī€ƒeveryī€ƒbitī€ƒofī€ƒtheī€ƒmaskī€ƒthatī€ƒisī€ƒsetī€ƒtoī€ƒ0ī€ƒspeciī‚æesī€ƒtheī€ƒrespectiveī€ƒbitī€ƒofī€ƒ
theī€ƒincomingī€ƒmessageī€ƒidentiī‚æerī€ƒtoī€ƒbeī€ƒĀ«donā€™tī€ƒcareĀ»ī€ƒforī€ƒidentiī‚æerī€ƒmatching.ī€ƒTheī€ƒfollow-
ingī€ƒexampleī€ƒillustratesī€ƒtheī€ƒmessageī€ƒī‚ælteringī€ƒinī€ƒtheī€ƒgeneralī€ƒcaseī€ƒforī€ƒstandardī€ƒ11ī€ƒbitī€ƒ
identiī‚æers:
Hex 10 9 8 7 6 5 4 3 2 1 0
Acceptance ID 0x137 0 0 1 0 0 1 1 0 1 1 1
Acceptanceī€ƒMask 0x7EC 1 1 1 1 1 1 0 1 1 0 0
Receivedī€ƒIdentiī‚æers 0 0 1 0 0 1 X 0 1 X X
0x124 0 0 1 0 0 1 0 0 1 0 0
0x125 0 0 1 0 0 1 0 0 1 0 1
0x126 0 0 1 0 0 1 0 0 1 1 0
0x127 0 0 1 0 0 1 0 0 1 1 1
0x134 0 0 1 0 0 1 1 0 1 0 0
0x135 0 0 1 0 0 1 1 0 1 0 1
0x136 0 0 1 0 0 1 1 0 1 1 0
0x137 0 0 1 0 0 1 1 0 1 1 1
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
2
Hardware
2-1
Characteristic | Interface
2 Hardware
2.1ī€ƒ Communicationī€ƒinterfacesī€ƒ
2.1.1ī€ƒ Forī€ƒtheī€ƒPCD3.M6240,ī€ƒPCD3.M6340ī€ƒandī€ƒPCD3.M6360
Controllerī€ƒAreaī€ƒNetworkī€ƒ(CAN)
1
2
3
4
5
6
7
8
9
RSī€ƒ232/PGU
Port 0
CANī€ƒ(9-poleī€ƒD-Subī€ƒsocket)
Port 10
D-Sub
pin
Signal D-Sub
pin
Signal Explanation
1 DCD 1 nc not connected
2 RXD 2 CAN_L* Receive/transmitī€ƒdataī€ƒnegative
3 TXD 3 GND* 0 V Data communication potent.
CAN Ground
4 DTR 4 nc not connected
5 GND 5 nc not connected
6 DSR 6 GND* 0 V Data communication potent.
Notī€ƒconnectedī€ƒonī€ƒprototypes!
7 RTS 7 CAN_H* Receive/transmitī€ƒdataī€ƒpositive
8 CTS 8 nc not connected
9 nc 9 nc not connected
Port 0 Port 10
*)
Galvanic isolated signals
For all types
Terminal block for supply, watchdog, interrupt inputs
and Port 2
Proī‚æbus
signal
Proī‚æbus
wiring
Pin Signal Explanation
1 D
Port 2; RS-485 up to 115 kbps
usable as free user interface
orī€ƒProī‚æī€ƒSBCī€ƒS-Busī€ƒupī€ƒtoī€ƒ
187.5 kbps
RxD/TxD-N
A
green
2 /D RxD/TxD-P
B
red
3 Int0 2 interrupt inputs or
1 fast counter
4 Int1
5 WD
Watchdog
6 WD
7 +24V
Power supply
8 GND
RS-485 terminator switch
Switch
position
Designation Explanation
left O without termination resistors
right C with termination resistors
PCD3.M6xxx is a CPU that provides a galvanic isolated high-speed CAN interface.
Theī€ƒCPUī€ƒhasī€ƒtheī€ƒsameī€ƒfunctionsī€ƒasī€ƒaī€ƒPCD3.M554xī€ƒexceptī€ƒthatī€ƒtheī€ƒSBCī€ƒS-Net/MPIī€ƒ
interfaceī€ƒisī€ƒreplacedī€ƒbyī€ƒCANī€ƒfunctionality.ī€ƒThisī€ƒdocumentī€ƒonlyī€ƒspeciī‚æesī€ƒdiļ‚‡erences.ī€ƒ
Please refer to existing PCD3.M554x documentation for common features.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
2
Hardware
2-2
Characteristic | Interface
2.1.2ī€ƒ CANī€ƒbusī€ƒattachment,ī€ƒmoduleī€ƒPCD7.F7400ī€ƒforī€ƒtheī€ƒPCD2.M5x40
The CAN Interface PCD7.F7400 provides a galvanic isolated high-speed CAN
interfaceī€ƒwithī€ƒupī€ƒtoī€ƒ1ī€ƒMBit/s.ī€ƒTheī€ƒCANī€ƒbusī€ƒshouldī€ƒbeī€ƒconnectedī€ƒdirectlyī€ƒtoī€ƒtheī€ƒ
PCD7.F7400 module.
PCD7.F7400
toī€ƒconnectī€ƒtheī€ƒCANī€ƒbus,ī€ƒī€ƒ 1ī€ƒMBit/s
CANī€ƒSpeciī‚æcations:ī€ƒī€ƒ CANī€ƒ2.0B
Isolation:ī€ƒ ī€ƒ ī€ƒ Galvanicī€ƒisolationī€ƒforī€ƒCAN_Lī€ƒandī€ƒCAN_H
Port: 8
PCD7.F7400
Controllerī€ƒAreaī€ƒNetworkī€ƒ(CAN)
CANī€ƒ(9-poleī€ƒD-Subī€ƒmale)ī€ƒonī€ƒslotī€ƒC
Port 8
D-Subī€ƒ
pin
Signal Explanation
1 nc not connected
2 CAN_L* Receive/transmitī€ƒdataī€ƒnegative
3 GND* 0 V Data communication potent.
CAN Ground
4 nc not connected
5 nc not connected
6 GND* 0 V Data communication potent.
7 CAN_H* Receive/transmitī€ƒdataī€ƒpositive
8 nc not connected
9 nc not connected
*)
Galvanic isolated signals
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
2
Hardware
2-3
Characteristic | Interface
2.2ī€ƒ CANī€ƒConnectionī€ƒ
2.2.1ī€ƒ Pinī€ƒsignalī€ƒdescription
CAN interface is the male D-Sub 9 on the right. Pin numbering is top view.
The Pinout is compliant to CiA Draft Standard 102 Revision 2.0.
Thisī€ƒstandardī€ƒdeī‚ænesī€ƒtheī€ƒCANī€ƒPhysicalī€ƒLayerī€ƒforī€ƒIndustrialī€ƒApplicationsī€ƒandī€ƒisī€ƒavail-
able for free on the Internet: www.can-cia.org
CANī€ƒ(Portī€ƒ10) Pin CiAī€ƒStandardī€ƒ102 SBCī€ƒwiring
1
2
3
4
5
6
7
8
9
1 Reserved not connected
2 CAN_Lī€ƒbusī€ƒlineī€ƒ(dominantī€ƒlow) CAN_Lī€ƒbusī€ƒlineī€ƒ(dominantī€ƒlow)ī€ƒ
Galvanic isolated
3 CAN_GNDī€ƒCANī€ƒGround CAN_GNDī€ƒCANī€ƒGround
Galvanic isolated
4 Reserved not connected
5 (CAN_SHLD)ī€ƒOptionalī€ƒCANī€ƒShield not connected
6 (GND)ī€ƒOptionalī€ƒCANī€ƒGround CAN_GNDī€ƒCANī€ƒGround
Galvanic isolated
Notī€ƒconnectedī€ƒonī€ƒprototype!
7 CAN_Hī€ƒbusī€ƒlineī€ƒ(dominantī€ƒhigh) CAN_Hī€ƒbusī€ƒlineī€ƒ(dominantī€ƒhigh)ī€ƒ
Galvanic isolated
8 Reservedī€ƒ(errorī€ƒline) not connected
9 (CAN_V+)ī€ƒOptionalī€ƒCANī€ƒexternalī€ƒ
positive supply
not connected
D-Subī€ƒīƒ€angeī€ƒisī€ƒconnectedī€ƒtoī€ƒmetallicī€ƒPCD3ī€ƒBackplate.
Noī€ƒbusī€ƒterminationī€ƒresistorī€ƒisī€ƒprovided.ī€ƒNominalī€ƒ120ī€ƒā„¦ī€ƒresistorsī€ƒmustī€ƒbeī€ƒplaceī€ƒatī€ƒbothī€ƒextremitiesī€ƒofī€ƒ
theī€ƒcableī€ƒbetweenī€ƒCAN_Lī€ƒandī€ƒCAN_Hī€ƒsignals.
2.2.2ī€ƒ Connectionsī€ƒandī€ƒcabling
Commercial bus couplers having an integrated bus termination are available and al-
low to build a network that is not disrupted impedance match in case of unconnected
cable.
Example of CAN bus coupler:
ERNI ERbic CAN BUS
Other manufacturers like Delconec or FCT also provide CAN bus couplers.
Accordingī€ƒtoī€ƒISOī€ƒ11898ī€ƒNorm,ī€ƒCableī€ƒlineī€ƒimpedanceī€ƒmustī€ƒbeī€ƒ120ī€ƒā„¦.
Forī€ƒCANī€ƒcablingī€ƒtheī€ƒuseī€ƒofī€ƒtwistedī€ƒpairī€ƒcableī€ƒ(2x2)ī€ƒhavingī€ƒanī€ƒimpedanceī€ƒofī€ƒ
108...132ī€ƒā„¦ī€ƒisī€ƒrecommended.
Example of rigid cable: www.intercond.com
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
2
Hardware
2-4
Characteristic | Interface
2.2.3ī€ƒ Maximumī€ƒdistanceī€ƒofī€ƒtheī€ƒnetwork
The maximum length of a CAN network is not only limited by signal levels but also by
its delay. A bit-to-bit arbitration is done in the addressing phase and the issuer needs
to listen to the answer on the cable to know if it grants the bus. This answer has to
reachī€ƒ(delay)ī€ƒtheī€ƒissuerī€ƒinī€ƒoneī€ƒbitī€ƒtime.
Atī€ƒ1ī€ƒMBit/s,ī€ƒitī€ƒisī€ƒtheoreticallyī€ƒpossibleī€ƒtoī€ƒreachī€ƒaī€ƒlengthī€ƒofī€ƒ40ī€ƒm.
However this 40 m distance is only possible with a non-isolated solution. With a
galvanicī€ƒisolatedī€ƒnode,ī€ƒanī€ƒadditionalī€ƒdelayī€ƒoī€ƒccursī€ƒinī€ƒtheī€ƒdataī€ƒpathī€ƒofī€ƒtheī€ƒinsulatorī€ƒ(inī€ƒ
ourī€ƒcaseī€ƒ15ī€ƒtoī€ƒ55ī€ƒnsī€ƒinī€ƒeveryī€ƒdirection).
Atī€ƒ1ī€ƒMBit/s,ī€ƒthisī€ƒreducesī€ƒtheī€ƒmaximumī€ƒlengthī€ƒtoī€ƒaboutī€ƒ22ī€ƒm.ī€ƒ(Assumedī€ƒeachī€ƒmeterī€ƒ
cableī€ƒhasī€ƒaī€ƒdelayī€ƒofī€ƒaboutī€ƒ5ī€ƒns).
Slower speeds also have a reduction of their maximum length but this is less rel-
evant.
Possible baud rates and approximate cable length:
Baud rate in Bit 10ī€ƒk 20ī€ƒk 50ī€ƒk 100ī€ƒk 125ī€ƒk 250ī€ƒk 500ī€ƒk 1ī€ƒM
Total maximum
length in m
5000 2500 1000 500 500 250 100 18
Maximum Stub
length in m
Distances over
1000 m with
repeater(s)ī€ƒsameī€ƒlimitsī€ƒ
as 50 kbits
< 50 < 20 < 20 < 10 < 5 < 1
Sum length of all
stubs
max.
250 m
max.
100 m
max.
100 m
max. 50
m
max. 25
m
max.
5 m
Never put a bus termination at the end of one stub.
Aī€ƒCANī€ƒnetworkī€ƒrequiresī€ƒaī€ƒ120ī€ƒā„¦ī€ƒterminationī€ƒ(betweenī€ƒCAN_Lī€ƒandī€ƒCAN_H)ī€ƒatī€ƒ
bothī€ƒendsī€ƒofī€ƒtheī€ƒnetworkī€ƒevenī€ƒforī€ƒshortī€ƒdistances.
2.2.4ī€ƒ Shielding
Shielded cable is necessary because High-speed CAN signal edges can not be lim-
ited to avoid electromagnetic pollution.
Shielding is also required for lower baud-rates.
Shieldingī€ƒcanī€ƒbeī€ƒconnectedī€ƒatī€ƒbothī€ƒendsī€ƒorī€ƒatī€ƒjustī€ƒoneī€ƒendī€ƒbutī€ƒatī€ƒleastī€ƒatī€ƒoneī€ƒplace.
CAN galvanic isolation: minimum 500 V
Number of supported nodes: 64
2.3ī€ƒ Portī€ƒIDī€ƒTableī€ƒforī€ƒCANī€ƒInterfaces
PCD3.M6360 Port 10
PCD3.M6340 Port 10
PCD3.M6240 Port 10
PCD2.M5x40 with PCD7.F7400 Port 8
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
General
3
3-1
3 Function
3.1ī€ƒ General
CANī€ƒLayer-2
Theī€ƒCANī€ƒcontrollerī€ƒonī€ƒtheī€ƒPLCī€ƒextensionī€ƒimplementsī€ƒaī€ƒCANī€ƒLayer-2ī€ƒaccessī€ƒtoī€ƒtheī€ƒ
bus.ī€ƒAllī€ƒLayer-2ī€ƒprotocolī€ƒhandlingī€ƒisī€ƒperformedī€ƒbyī€ƒtheī€ƒcontroller.ī€ƒTheī€ƒuserī€ƒcanī€ƒgiveī€ƒaī€ƒ
message to the controller and specify when it is sent. The user can also specify which
messages are to be received by the controller and read the messages out of the con-
troller memory after reception.
Operatingī€ƒmodes
Theī€ƒCANī€ƒcontrollerī€ƒprovidesī€ƒseveralī€ƒbuļ‚‡ersī€ƒ(messageī€ƒobjects)ī€ƒwhichī€ƒcanī€ƒbeī€ƒfreelyī€ƒ
conī‚æguredī€ƒasī€ƒtransmissionī€ƒorī€ƒreceptionī€ƒbuļ‚‡ersī€ƒforī€ƒanyī€ƒmessageī€ƒID.ī€ƒTheī€ƒuserī€ƒisī€ƒpro-
videdī€ƒwithī€ƒthreeī€ƒdiļ‚‡erentī€ƒtypesī€ƒofī€ƒaccessesī€ƒtoī€ƒtheī€ƒcontrollerī€ƒfunctionality:
ā—ī€ƒ CAN Direct Access (FullCAN):ī€ƒdirectī€ƒhardwareī€ƒaccessī€ƒtoī€ƒallī€ƒ32ī€ƒbuļ‚‡ers.ī€ƒTheī€ƒī€ƒ
ī€ƒ userī€ƒcanī€ƒindependentlyī€ƒaccessī€ƒallī€ƒ32ī€ƒbuļ‚‡ers.ī€ƒAnī€ƒextensiveī€ƒinterfaceī€ƒprovidesī€ƒī€ƒ
all functionality integrated in the CAN controller. This mode is analogue to the
FullCAN principle implemented in the controller itself.
ā—ī€ƒ CAN Basic Services (BasicCAN):ī€ƒoneī€ƒTransmitī€ƒandī€ƒoneī€ƒReceiveī€ƒQueueī€ƒī€ƒ
allow a simpler handling of CAN communication in the user program. Several
ī€ƒ messagesī€ƒcanī€ƒbeī€ƒsentī€ƒthroughī€ƒtheī€ƒqueueī€ƒwithoutī€ƒwaitingī€ƒforī€ƒtheī€ƒconī‚ærmationī€ƒī€ƒ
of each message. The receive queue ensures that no messages are lost on
ī€ƒ receptionī€ƒ(ifī€ƒtheī€ƒqueueī€ƒdepthī€ƒisī€ƒdesignedī€ƒaccordingly).ī€ƒTheī€ƒuserī€ƒinterfaceī€ƒisī€ƒī€ƒ
ī€ƒ considerablyī€ƒsimpliī‚æedī€ƒinī€ƒcomparisonī€ƒtoī€ƒtheī€ƒCANī€ƒDirectī€ƒAccess.ī€ƒThisī€ƒmodeī€ƒisī€ƒī€ƒ
analogue to the BasicCAN principle implemented in several simple CAN cont
rollers with only one receive and one transmit path.
ā—ī€ƒ CAN Data Mapping: the data mapping does simplify and automate the cyclic
ī€ƒ exchangeī€ƒofī€ƒprocessī€ƒdata.ī€ƒThisī€ƒmappingī€ƒisī€ƒconī‚æguredī€ƒatī€ƒstart-upī€ƒwithī€ƒtheī€ƒmesī€ƒ
sage IDs to be handled. The message data is directly mapped to process data
ī€ƒ ofī€ƒtheī€ƒPLC.ī€ƒAllī€ƒoutputī€ƒmessagesī€ƒareī€ƒautomaticallyī€ƒsentī€ƒbyī€ƒtheī€ƒdataī€ƒmanagerī€ƒinī€ƒī€ƒ
ī€ƒ aī€ƒspeciī‚æedī€ƒinterval.ī€ƒTheī€ƒreceivedī€ƒmessagesī€ƒareī€ƒmappedī€ƒtoī€ƒtheī€ƒprocessī€ƒdataī€ƒbyī€ƒī€ƒ
the manager.
The three modes can be used simultaneously with some limitations concerning the
messageī€ƒIDī€ƒrangesī€ƒassignedī€ƒtoī€ƒtheī€ƒdiļ‚‡erentī€ƒmodes.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
General
3
3-2
The following image gives an overview of the provided CAN architecture:
CAN Layer 2
RX
Buffer 28
TX
Buffer 29
RX
Buffer 30
TX
Buffer 31
CAN Basic Services
RX
Queue
high
Priority
CAN
Direct Access
TX
Queue
high
Priority
RX
Queue
low
Priority
TX
Queue
low
Priority
CAN Data Mapping
CAN Process image
Configuration DB
PLC
Periphery
Managment
CAN Bus
ID = high Prio ID = low Prio
Indication
Process image
Timer
Send
ID = any Prio
Buffer 0 - 27
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
CAN Direct Access
3
3-3
3.2ī€ƒ CANī€ƒDirectī€ƒAccess
3.2.1ī€ƒ General
Theī€ƒCANī€ƒcontrollerī€ƒprovidesī€ƒ32ī€ƒmessageī€ƒobjects.ī€ƒEachī€ƒobjectī€ƒrepresentsī€ƒoneī€ƒmes-
sageī€ƒbuļ‚‡erī€ƒofī€ƒupī€ƒtoī€ƒ8ī€ƒdataī€ƒbytesī€ƒandī€ƒisī€ƒfreelyī€ƒconī‚ægurableī€ƒasī€ƒreceiveī€ƒorī€ƒtransmitī€ƒ
buļ‚‡erī€ƒandī€ƒmaskable.
The user interface provides access to the hardware controller as direct as possible.
Thereforeī€ƒallī€ƒaccessesī€ƒareī€ƒorientedī€ƒtowardsī€ƒmessageī€ƒobjectsī€ƒratherī€ƒthanī€ƒjustī€ƒsimpleī€ƒ
messages.ī€ƒEachī€ƒSystemī€ƒFunctionī€ƒcallī€ƒrequiresī€ƒasī€ƒparameterī€ƒtheī€ƒObjectī€ƒIDī€ƒreferringī€ƒ
toī€ƒtheī€ƒrespectiveī€ƒmessageī€ƒobjectī€ƒinī€ƒtheī€ƒCANī€ƒcontroller.ī€ƒThisī€ƒgivesī€ƒtheī€ƒapplicationī€ƒfullī€ƒ
access to the functionality of each CAN controller.
Of course not every CAN controller provides exactly the same functionality which is
why a certain level of abstraction is required. Also some specialties of the used CAN
controller must be known to the application programmer. These are explained in the
detailed description hereafter.
3.2.2ī€ƒ Pollingī€ƒvsī€ƒinterrupts
Both System Functions for receiving and sending messages provide means to oper-
ate in poll and interrupt mode. Poll and interrupt modes can also be used concur-
rentlyī€ƒforī€ƒdiļ‚‡erentī€ƒmessageī€ƒobjects.ī€ƒTheī€ƒsameī€ƒobjectī€ƒcanī€ƒalsoī€ƒbeī€ƒpolledī€ƒtoī€ƒrequestī€ƒitsī€ƒ
status while it is in interrupt mode.
The choice of poll or interrupt mode is entirely up to the application programmer and
mustī€ƒbeī€ƒchosenī€ƒaccordingī€ƒtoī€ƒtheī€ƒapplicationā€™sī€ƒrequirements.
Note however that it is not question of the hardware interrupts of the CAN controller
here. The described interrupts are an abstraction to the application.
3.2.3ī€ƒ Remoteī€ƒtransmissionī€ƒrequestsī€ƒRTR
The driver supports handling of remote transmission requests for both receive and
transmitī€ƒobjects.
Aī€ƒsendī€ƒobjectī€ƒthatī€ƒisī€ƒactivatedī€ƒforī€ƒRTRī€ƒwillī€ƒsendī€ƒtheī€ƒframeī€ƒonlyī€ƒuponī€ƒreceptionī€ƒofī€ƒaī€ƒ
corresponding RTR from another station.
Aī€ƒreceiveī€ƒobjectī€ƒreleasedī€ƒforī€ƒRTRī€ƒwillī€ƒissueī€ƒanī€ƒRTRī€ƒframeī€ƒandī€ƒstoreī€ƒtheī€ƒresponseī€ƒinī€ƒ
theī€ƒobjectā€™sī€ƒdataī€ƒbuļ‚‡er.
Aī€ƒmessageī€ƒobjectī€ƒisī€ƒnotī€ƒconstantlyī€ƒconī‚æguredī€ƒforī€ƒRTRī€ƒframes.ī€ƒForī€ƒeachī€ƒjobī€ƒitī€ƒcanī€ƒbeī€ƒ
used for RTR handling or not.
3.2.4ī€ƒ Initialisationī€ƒsequence
Before any message transfers can occur the driver must be initialised and started by
executing the following steps:
1)ī€ƒ Conī‚ægureī€ƒtheī€ƒdriverī€ƒwithī€ƒtheī€ƒbasicī€ƒparameterī€ƒsetī€ƒusingī€ƒtheī€ƒrespectiveī€ƒSystemī€ƒī€ƒ
Function
2)ī€ƒ Conī‚ægureī€ƒeachī€ƒmessageī€ƒobjectī€ƒusingī€ƒtheī€ƒrespectiveī€ƒSystemī€ƒFunction
3)ī€ƒ Releaseī€ƒallī€ƒreceptionī€ƒbuļ‚‡ersī€ƒbyī€ƒcallingī€ƒtheī€ƒrespectiveī€ƒSystemī€ƒFunctionī€ƒforī€ƒī€ƒ
ī€ƒ eachī€ƒreceiveī€ƒobjectī€ƒtoī€ƒbeī€ƒreleased
3.2.5ī€ƒ Self-receivedī€ƒframes
The CAN controller does not receive self-transmitted frames even if there exists a
matchingī€ƒreceiveī€ƒmessageī€ƒobject.
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
CAN Basic Services
3
3-4
3.3ī€ƒ CANī€ƒBasicī€ƒServices
3.3.1ī€ƒ General
Theī€ƒimplementationī€ƒofī€ƒQueuesī€ƒprovidesī€ƒtheī€ƒuserī€ƒwithī€ƒaī€ƒconceptī€ƒthatī€ƒisī€ƒanalogueī€ƒtoī€ƒ
the BasicCAN principle implemented by several CAN controllers. The user gets ac-
cess to one receive and one send queue. In this mode the user does not care about
orī€ƒdirectlyī€ƒhandleī€ƒtheī€ƒmessageī€ƒobjectsī€ƒinī€ƒtheī€ƒCANī€ƒcontroller.ī€ƒThisī€ƒtaskī€ƒisī€ƒperformedī€ƒ
byī€ƒtheī€ƒQueue-Handler.
Theī€ƒqueuesī€ƒuseī€ƒtheī€ƒtwoī€ƒmessageī€ƒobjectsī€ƒwithī€ƒtheī€ƒhighestī€ƒnumberī€ƒinī€ƒtheī€ƒCANī€ƒcon-
troller.ī€ƒAccessī€ƒtoī€ƒtheseī€ƒmessageī€ƒobjectsī€ƒisī€ƒblockedī€ƒforī€ƒtheī€ƒCANī€ƒDirectī€ƒAccessī€ƒSys-
temī€ƒFunctionsī€ƒasī€ƒsoonī€ƒasī€ƒtheī€ƒqueuesī€ƒareī€ƒconī‚ægured.
It is possible to operate in CAN Direct Access and CAN Basic Services modes simul-
taneously.ī€ƒToī€ƒensureī€ƒaī€ƒcorrectī€ƒhandlingī€ƒofī€ƒreceivedī€ƒmessages,ī€ƒtheī€ƒIDī€ƒrangesī€ƒconī‚æg-
uredī€ƒforī€ƒeitherī€ƒmodeī€ƒmustī€ƒbeī€ƒseparatedī€ƒ(i.e.ī€ƒnotī€ƒoverlapping).
All CAN IDs can be received and sent over the same queue. The ID range to be
handledī€ƒbyī€ƒtheī€ƒqueuesī€ƒisī€ƒconī‚ægurable.ī€ƒThisī€ƒleavesī€ƒtheī€ƒpossibilityī€ƒforī€ƒtheī€ƒexcludedī€ƒIDī€ƒ
range to be handled with the System Functions in the CAN Direct Access mode at the
sameī€ƒtime.ī€ƒTheī€ƒqueueī€ƒdepthī€ƒisī€ƒconī‚ægurableī€ƒasī€ƒwell.
The send queue allows sending more than one telegram at a time without waiting
for the successful transmission. There is no feedback possible for transmission of a
singleī€ƒmessage.ī€ƒHoweverī€ƒwhenī€ƒtheī€ƒqueueī€ƒbecomesī€ƒemptyī€ƒ(i.e.ī€ƒtheī€ƒlastī€ƒmessageī€ƒhasī€ƒ
successfullyī€ƒbeenī€ƒsent)ī€ƒaī€ƒcorrespondingī€ƒinterruptī€ƒcallī€ƒcanī€ƒbeī€ƒgenerated.
The receive queue avoids the loss of messages on reception. There is no indication
of the reception of a single message. However when a message is received into an
emptyī€ƒqueueī€ƒ(i.e.ī€ƒtheī€ƒī‚ærstī€ƒmessageī€ƒisī€ƒreceived)ī€ƒanī€ƒinterruptī€ƒcallī€ƒcanī€ƒbeī€ƒgenerated.
3.3.2ī€ƒ Remoteī€ƒtransmissionī€ƒrequestsī€ƒRTR
Remote requests RTR cannot be handled with-in the queues.
3.3.3ī€ƒ Initialisationī€ƒsequence
Before any message transfers can occur the driver must be initialised and started by
executing the following steps:
1)ī€ƒī€ƒī€ƒConī‚ægureī€ƒtheī€ƒdriverī€ƒwithī€ƒtheī€ƒbasicī€ƒparameterī€ƒsetī€ƒusingī€ƒtheī€ƒrespectiveī€ƒSystem-
Function
2)ī€ƒī€ƒī€ƒConī‚ægureī€ƒtheī€ƒreceiveī€ƒandī€ƒtransmitī€ƒqueueī€ƒusingī€ƒtheī€ƒrespectiveī€ƒSystemī€ƒFunction
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
CAN Data Mapping
3
3-5
3.4ī€ƒ CANī€ƒDataī€ƒMapping
3.4.1ī€ƒ General
The CAN Data Mapping provides an intermediary CAN application layer that auto-
maticallyī€ƒmanagesī€ƒtheī€ƒcopying,ī€ƒtransmissionī€ƒandī€ƒreceptionī€ƒofī€ƒPLCī€ƒinputī€ƒandī€ƒoutputī€ƒ
media.
This principle shows certain similarities with the PDOs in CANopen. However it is
clearlyī€ƒlocatedī€ƒsomewhereī€ƒbetweenī€ƒtheī€ƒCANī€ƒLayerī€ƒ2ī€ƒandī€ƒtheī€ƒCANopenī€ƒapplicationī€ƒ
layerī€ƒandī€ƒthereforeī€ƒitī€ƒisī€ƒSBC-speciī‚æc.
The CAN Data Mapping supports the following functionalities:
ā—ī€ƒ Aī€ƒrangeī€ƒofī€ƒCANī€ƒmessageī€ƒIDsī€ƒcanī€ƒbeī€ƒassignedī€ƒtoī€ƒtheī€ƒCANī€ƒDataī€ƒMappingī€ƒsuchī€ƒī€ƒ
ī€ƒ thatī€ƒtheī€ƒCANī€ƒdataī€ƒisī€ƒdirectlyī€ƒmappedī€ƒtoī€ƒtheī€ƒPLCī€ƒinputī€ƒandī€ƒoutputī€ƒmedia
ā—ī€ƒ Both,ī€ƒprocessī€ƒimageī€ƒandī€ƒdirectī€ƒperipheryī€ƒaccessesī€ƒareī€ƒsupportedī€ƒbyī€ƒtheī€ƒCANī€ƒī€ƒ
ī€ƒ Dataī€ƒMappingī€ƒ(xx7)
ā—ī€ƒ Theī€ƒconī‚ægurationī€ƒofī€ƒtheī€ƒdataī€ƒmappingī€ƒisī€ƒdeī‚ænedī€ƒinī€ƒaī€ƒDB/DBX
ā—ī€ƒ Theī€ƒoutputī€ƒmediaī€ƒareī€ƒautomaticallyī€ƒcopiedī€ƒtoī€ƒtheī€ƒconī‚æguredī€ƒCANī€ƒtelegramsī€ƒatī€ƒī€ƒ
ī€ƒ theī€ƒendī€ƒofī€ƒtheī€ƒPLCī€ƒcycle
ā—ī€ƒ Theī€ƒtransmissionī€ƒofī€ƒallī€ƒoutputsī€ƒisī€ƒtriggeredī€ƒbyī€ƒaī€ƒconī‚ægurableī€ƒcyclicī€ƒtimer
ā—ī€ƒ Anī€ƒoptionī€ƒallowsī€ƒonlyī€ƒsendingī€ƒtelegramsī€ƒwhoseī€ƒdataī€ƒhasī€ƒchangedī€ƒsinceī€ƒtheī€ƒī€ƒ
last transmission
ā—ī€ƒ Theī€ƒdataī€ƒofī€ƒreceivedī€ƒCANī€ƒtelegramsī€ƒisī€ƒautomaticallyī€ƒcopiedī€ƒtoī€ƒtheī€ƒconī‚æguredī€ƒī€ƒ
ī€ƒ PLCī€ƒinputī€ƒmediaī€ƒatī€ƒtheī€ƒbeginningī€ƒofī€ƒtheī€ƒPLCī€ƒcycle.
3.4.2ī€ƒ CANī€ƒprocessī€ƒimage
The CAN Data Mapping has its internal process image which represents the periph-
eryī€ƒtoī€ƒtheī€ƒPLC.ī€ƒTheī€ƒtransferī€ƒofī€ƒthisī€ƒimageī€ƒtoī€ƒandī€ƒfromī€ƒotherī€ƒCANī€ƒnodesī€ƒisī€ƒperformedī€ƒ
by the CAN Data Mapping in an autonomous manner.
Theī€ƒfollowingī€ƒlimitationsī€ƒareī€ƒcurrentlyī€ƒdeī‚æned:
CANī€ƒprocessī€ƒimageī€ƒsizeī€ƒinī€ƒbytes,ī€ƒtotalī€ƒ(Rxī€ƒ+ī€ƒTx) 2048
Maximalī€ƒnumberī€ƒofī€ƒmessages,ī€ƒtotalī€ƒ(Rxī€ƒ+ī€ƒTx) 256
8 bytes are allocated for each message ID even if not all bytes of that message are
mappedī€ƒtoī€ƒPLCī€ƒmedia.ī€ƒTheī€ƒavailableī€ƒmemoryī€ƒspaceī€ƒisī€ƒevenlyī€ƒdistributedī€ƒbetweenī€ƒ
inputsī€ƒ(Rx)ī€ƒandī€ƒoutputsī€ƒ(Tx).
3.4.3ī€ƒ Conī‚æguration
CANī€ƒmessagesī€ƒrespectivelyī€ƒIDsī€ƒcanī€ƒbeī€ƒconī‚æguredī€ƒtoī€ƒexchangeī€ƒdataī€ƒwithī€ƒtheī€ƒCANī€ƒ
processī€ƒimage.ī€ƒAllī€ƒIDsī€ƒmustī€ƒbeī€ƒinī€ƒaī€ƒhighī€ƒpriorityī€ƒrangeī€ƒwhichī€ƒisī€ƒdeī‚ænableī€ƒwithī€ƒaī€ƒsingleī€ƒ
mask, typically from 0 to a threshold.
One CAN ID is associated to one single telegram per transfer direction. Hence, it is
notī€ƒpossibleī€ƒtoī€ƒdeī‚æneī€ƒseveralī€ƒtelegramsī€ƒwithī€ƒtheī€ƒsameī€ƒIDī€ƒforī€ƒtransmissionī€ƒ(outputs)ī€ƒ
orī€ƒreceptionī€ƒ(inputs).
The length of the transmittedī€ƒoutputī€ƒtelegramsī€ƒisī€ƒdeī‚ænedī€ƒbyī€ƒtheī€ƒhighestī€ƒbyteī€ƒinī€ƒtheī€ƒ
messageī€ƒtoī€ƒwhichī€ƒaī€ƒPLCī€ƒoutputī€ƒisī€ƒmapped.ī€ƒIfī€ƒbytesī€ƒ0ī€ƒandī€ƒ1ī€ƒareī€ƒnotī€ƒmappedī€ƒwhileī€ƒ
bytesī€ƒ2ī€ƒandī€ƒ3ī€ƒareī€ƒmappedī€ƒforī€ƒaī€ƒspeciī‚æcī€ƒmessageī€ƒID,ī€ƒthenī€ƒ4ī€ƒbytesī€ƒwillī€ƒbeī€ƒtransmittedī€ƒ
each cycle, where bytes 0 and 1 are always zero.
The length of the receivedī€ƒinputī€ƒtelegrams does not necessarily have to correspond
to the number of mapped input bytes. Two cases are of importance:
Saia-Burgess Controls AG
CAN Manual for Saia PCD Classic CPUs ā”‚ Document 26-839 ENG05 ā”‚ 2019-05-27
Function
CAN Data Mapping
3
3-6
ā—ī€ƒ Aī€ƒreceivedī€ƒtelegramī€ƒcontainsī€ƒmoreī€ƒbytesī€ƒthanī€ƒconī‚ægured:ī€ƒAllī€ƒbytesī€ƒconī‚æguredī€ƒī€ƒ
in the DB are copied to the CAN process image. The remaining bytes are igno
red resp. the user cannot access them
ā—ī€ƒ Aī€ƒreceivedī€ƒtelegramī€ƒcontainsī€ƒlessī€ƒbytesī€ƒthanī€ƒconī‚ægured:ī€ƒAllī€ƒreceivedī€ƒbytesī€ƒareī€ƒī€ƒ
copied. The remaining bytes in the CAN process image are left unchanged.
3.4.4ī€ƒ Dataī€ƒtransfer
Theī€ƒdataī€ƒofī€ƒallī€ƒreceivedī€ƒandī€ƒconī‚æguredī€ƒtelegramsī€ƒisī€ƒautomaticallyī€ƒtransferredī€ƒtoī€ƒtheī€ƒ
internal CAN process image. The outputs are transferred from the CAN process im-
ageī€ƒandī€ƒareī€ƒsentī€ƒwhenī€ƒtheī€ƒconī‚æguredī€ƒtimerī€ƒelapses.ī€ƒItī€ƒisī€ƒimportantī€ƒtoī€ƒnoteī€ƒthatī€ƒdur-
ingī€ƒtransmissionī€ƒofī€ƒtheī€ƒoutputsī€ƒtheī€ƒCANī€ƒbusī€ƒisī€ƒusedī€ƒtoī€ƒfullī€ƒ100%ī€ƒofī€ƒitsī€ƒcapacity.
Theī€ƒinputsī€ƒareī€ƒcopiedī€ƒfromī€ƒtheī€ƒCANī€ƒprocessī€ƒimageī€ƒtoī€ƒtheī€ƒPLCī€ƒprocessī€ƒimageī€ƒatī€ƒtheī€ƒ
beginningī€ƒofī€ƒtheī€ƒPLCī€ƒcycle.ī€ƒTheī€ƒoutputsī€ƒareī€ƒtransferredī€ƒfromī€ƒtheī€ƒPLCī€ƒprocessī€ƒimageī€ƒ
toī€ƒtheī€ƒCANī€ƒprocessī€ƒimageī€ƒatī€ƒtheī€ƒendī€ƒofī€ƒtheī€ƒPLCī€ƒcycle.ī€ƒFurthermore,ī€ƒdirectī€ƒperipheryī€ƒ
accesses allow accessing the CAN process image at any time.
Since the received data is automatically copied from the CAN message to the pro-
cess image it is not ensured that the user will get the data of every single received
telegram. A following telegram will overwrite the data of the previous telegram with
the same message ID. If the user has not read the data in-between, the data of the
previous telegram will be ā€œlostā€ to the user.
It is optionally possible to only send telegrams where at least one byte has changed
since the last transmission. However this requires more computing power before
each transmission.
Likewiseī€ƒitī€ƒhasī€ƒtoī€ƒbeī€ƒkeptī€ƒinī€ƒmindī€ƒthatī€ƒafterī€ƒeachī€ƒreceptionī€ƒtheī€ƒcorrespondingī€ƒmap-
ping entry must be searched. The time for this search increases with the number of
input mapping entries.
Asī€ƒsoonī€ƒasī€ƒtheī€ƒCANī€ƒDataī€ƒMappingī€ƒisī€ƒconī‚ægured,ī€ƒbuļ‚‡ersī€ƒ28ī€ƒandī€ƒ29ī€ƒofī€ƒtheī€ƒCANī€ƒcon-
troller are reserved. Those are then not accessible anymore for CAN Direct Access or
CAN Basic Services.
Ifī€ƒtheī€ƒCANī€ƒDataī€ƒMappingī€ƒreceivesī€ƒaī€ƒmessageī€ƒwhoseī€ƒIDī€ƒisī€ƒnotī€ƒconī‚ægured,ī€ƒthisī€ƒmes-
sage is ignored and data is lost.
3.4.5ī€ƒ Remoteī€ƒtransmissionī€ƒrequestsī€ƒRTR
Theī€ƒuseī€ƒofī€ƒRemoteī€ƒrequestsī€ƒisī€ƒnotī€ƒpossibleī€ƒwith-inī€ƒtheī€ƒconī‚ægurationī€ƒofī€ƒtheī€ƒCANī€ƒDataī€ƒ
Mapping.
3.4.6ī€ƒ Initialisationī€ƒsequence
Beforeī€ƒtheī€ƒCANī€ƒDataī€ƒMappingī€ƒcanī€ƒbeī€ƒconī‚ægured,ī€ƒtheī€ƒCANī€ƒdriverī€ƒmustī€ƒbeī€ƒinitialisedī€ƒ
and started. The following steps must be executed:
1)ī€ƒ Conī‚ægureī€ƒtheī€ƒCANī€ƒdriverī€ƒwithī€ƒtheī€ƒbasicī€ƒparameterī€ƒsetī€ƒusingī€ƒtheī€ƒrespectiveī€ƒī€ƒ
System Function.
2)ī€ƒ Conī‚ægureī€ƒtheī€ƒCANī€ƒDataī€ƒMappingī€ƒusingī€ƒtheī€ƒrespectiveī€ƒSystemī€ƒFunction
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42

SBC CAN-Functions on Classic PCDs Owner's manual

Type
Owner's manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI