atlas dcs elmb course1 readout chain canopen master/slave node object dictionary elmb canopen slave...
Post on 29-Mar-2015
256 Views
Preview:
TRANSCRIPT
ELMB Course 1
ATLASDCS
Readout ChainReadout Chain
CANopenMaster/SlavenodeO
bjec
tdi
ctio
nary
ELMB CANopenSlave node O
bjec
tdi
ctio
nary
Voltage channelsOPC Server
PC, VME, etc.
PDO Exchange
SCADA System OPC Client
ELMBELMB Digitization of analog inputs
OPC ServerOPC Server Client-server architecture Conversion to physical units Standard connection for any OPC Client
PVSSPVSS Fine calibration and data display
ELMB Course 2
ATLASDCS
Typical ApplicationTypical Application
ELMBELMB Maximum of 32 ELMBs in a branch
Kvaser PCI card (2 or 4 port)Kvaser PCI card (2 or 4 port) CANbus cable from USA15 or US15 to UX15CANbus cable from USA15 or US15 to UX15
TIS qualified Shielded Length ≈ 150m Including remote powering, 7 lines:
GND CAN signals CAN power (20 mA/ELMB) Digital + Analog power (15 + 9 mA/ELMB)
CAN Power Crate or commercial Power SupplyCAN Power Crate or commercial Power Supply Patch panelPatch panel Rack (and wall) mounted ELMB motherboardRack (and wall) mounted ELMB motherboard
ELMB Course 3
ATLASDCS
Physical DistributionPhysical Distribution
PSPS Kvaser Kvaser PCI-CANPCI-CAN
Patch PanelPatch Panel
Rack MountedRack Mounted ELMBsELMBs
USA15USA15
UX15UX15
s ~ 0.5 ms ~ 0.5 ms ~ 5 ms ~ 5 m
ELMB Course 4
ATLASDCS
The CAN BusThe CAN Bus
Each node must have a unique IDEach node must have a unique ID 0 reserved; applies to all nodes in the CANbus
Both ends of bus must be terminatedBoth ends of bus must be terminated 120 ohm resistor between CAN_H and CAN_L
Straight Bus configurationStraight Bus configuration Star or Ring configurations are not possible
Maximum of 63 ELMBs per busMaximum of 63 ELMBs per bus Recommended maximum of 32 per bus
Configurable baud rateConfigurable baud rate Faster rates restrict bus length
125 Kbaud ≈ 500m 250 Kbaud ≈ 270m
ELMB_0x01 ELMB_0x03
ELMB_0x02
ELMB_0x3f
ELMB_0x3e
120Ω Terminator
120Ω Terminator
CAN Master (PC)
L >> l
l
L
ELMB Course 5
ATLASDCS
The ELMBThe ELMB(Embedded Local Monitor Board)(Embedded Local Monitor Board)
General purpose CAN node using CANopen Flexible I/O functions
Multiplexed ADC, 16 bit, 64 channels with signal adaptation. Configurable for rate, range, mode and number of channels
8 input, 8 output and 8 definable I/O ports SPI bus Low power consumption, opto-isolated Add-ons: DAC, 12 bit, 16-64
channelsInterlock facility
Data sent periodically, on-request or on-change Radiation tolerant
0.5 Gy and 3*1010 neutrons per year Operation in field of 1.5 Tesla Remote diagnostics and loading of SW SEE detection and recovery
Node ID DIP
switches
ELMB Course 6
ATLASDCS
ELMB MotherboardELMB Motherboard
General purpose motherboardGeneral purpose motherboard Allows for signal adaptation Connectors for analog and digital input and outputs Power connector CAN bus connector
ELMB Course 7
ATLASDCS
Motherboard Bottom SideMotherboard Bottom Side
J23Ch. 56-59
J24Ch. 48-51
J27Ch. 24-27
J28Ch. 16-19
J20Ch. 32-35
J18Ch. 36-39
J14Ch. 0-3
J16Ch. 4-7
J21Ch. 60-63
J22Ch. 52-55
J25Ch. 28-31
J26Ch. 20-23
J17Ch. 40-43
J19Ch. 44-47
J13Ch. 8-11
J15Ch. 12-15
ELMB Course 8
ATLASDCS
AdaptersAdapters
Temperature sensors – 2 wireTemperature sensors – 2 wire For NTC 10K or PT1000
Temperature sensors – 4 wireTemperature sensors – 4 wire For PT100
Differential voltage attenuatorDifferential voltage attenuator Attenuates 1:100
Inline resistorsInline resistors 1Kohm resistors for simple voltage measurement
Resistor values on adapters may be modifiedfor greater accuracy over a known voltage range
ELMB Course 9
ATLASDCS
Motherboard Top SideMotherboard Top Side
ADC inputch 48 - 63
ADC inputch 16 - 31
ADC inputch 32 - 47
ADC inputch 0 - 15
ResetCAN busJ11
Power cable
J10
Port A
Port F SPI
Port C
J4J3
ELMB Course 10
ATLASDCS
ELMB 128 Block DiagramELMB 128 Block Diagram
ELMB Course 11
ATLASDCS
PoweringPowering Ways to power the ELMBWays to power the ELMB
CAN and Digital power supplied through the CAN bus Need to connect Analog power to Digital or CAN Recommended to connect Analog power to Digital as
CAN draws more current Useful for highly distributed systems
Supply power through motherboard using up to three different supplies
Possible to connect the three power sections together and supply only one voltage (not recommended)
ADC Input Ch 48-63
ADC Input Ch 16-31
ADC Input Ch 32-47
ADC Input Ch 0-15
Reset CAN bus
J10 J4 J3 J11 Port C Port F Port A
SPI Port
Power Supply
10V + -
VAP VDP
VAG VDG
10V + -
VCP VCG
Analog Digital
CAN
Example showing ELMB connections with two power supplies
VCP
VCG
VDP
VDG
VAP
VAG
Power Cable
Analog
CAN
Digital
ELMB Course 12
ATLASDCS
Installing Kvaser CardInstalling Kvaser Card
Download drivers from:Download drivers from:www.kvaser.comThen go to ‘Support ▼’, ‘Downloads’ and under heading ‘Files for specific products’ click ‘Files for PCIcan’
Run setup programRun setup program Shut-down PCShut-down PC Check switches (SW-1 and SW-2) on CAN card and Check switches (SW-1 and SW-2) on CAN card and
set as necessary (only for 4-port card)set as necessary (only for 4-port card) Pay special attention to ‘common bus’
Install Kvaser card in free PCI slotInstall Kvaser card in free PCI slot Start PCStart PC Last setup steps will be completedLast setup steps will be completed
ELMB Course 13
ATLASDCS
Kvaser 4-port CAN CardKvaser 4-port CAN Card
SW-1SW-1 To connect CAN
ground to PC ground (switches 1 and 2 – switch 3 is unused)
SW-2SW-2 On-board
terminators for “common bus” (switches 1 and 2)
Connection of ports to “common bus” (switches 3 to 10)
ELMB Course 14
ATLASDCS
Installing OPC ServerInstalling OPC Server(and diagnostic software)(and diagnostic software)
Download setup zip file from:Download setup zip file from:http://atlas.web.cern.ch/Atlas/GROUPS/DAQTRIG/DCS/ELMB/DIST/OPC/OPCSetup.zipor, for a self extracting zip filehttp://atlas.web.cern.ch/Atlas/GROUPS/DAQTRIG/DCS/ELMB/DIST/OPC/OPCSetupZip.exe
Unzip to temporary folderUnzip to temporary folder Login as ‘Administrator’ to local PCLogin as ‘Administrator’ to local PC
Do NOT login to network Do NOT login with a different user name (even if the user has
administration rights) Run ‘setup.exe’ from the temporary folderRun ‘setup.exe’ from the temporary folder Install required componentsInstall required components
Kvaser and/or NICAN component Help files Diagnostic Tools OPC Server
ELMB Course 15
ATLASDCS
• CAN is one of the three recommended fieldbuses at CERN
• Defines two first layers of the OSI communication model
• Physical: Communication medium
• Data link: How the data frames look like
• CANopen is a High-level communication protocol on top of CAN
• Defines how CAN frames are used
• CANopen chosen on the basis of its flexibility and acceptance
The ELMB framework will try to hide CAN/CANopen from the users
However, a small background on the technologies will help you to understandwhy things have to be executed in a given sequence
CAN/CANopen backgroundCAN/CANopen background
ELMB Course 16
ATLASDCS All device parameters are stored in an object dictionary.
The object dictionary contains the description, data type and structure of a parameter, as well as its address
Co
mm
un
icat
ion
Inte
rfac
e
PD
O, S
DO
, NM
T Object Dictionary
Data types, Communicationand application
objects
Application
ApplicationProgram,
Device Profileimplementation
CANopen deviceSDOTxPDORxPDO
NGNMTSYNCEMCY
Pro
cess
IO
CANopen device modelCANopen device model
ELMB Course 17
ATLASDCS
• Master-slave and slave-slave communication modes• The ELMB standard readout chain implements the master-slave model
• PVSS application, using the OPC server, is CANopen master.
• A CANopen master as a network manager • node configuration
• network boot
• supervision
CANopen communication CANopen communication modelmodel
ELMB Course 18
ATLASDCS
1. Process Data Objects (PDO):
• Real time transfers
• Unconfirmed in broadcast mode
• Up to 8 data bytes
• Two types:
• Received (RxPDO): Outputs
• Transmitted (TxPDO): Inputs
2. Service Data Objects (SDO):
• Mainly used for device configuration
• Access to object dictionary
• Peer-to-peer
• Confirmed data transfer of arbitrary
length
CANopen communication objects can be classified in four categories
3. Administrative Objects:
• Network Management (NMT)
• Node Guarding (NG)
4. Special Function Objects:• Network synchronization (SYNC)
• Error conditions (EMCY)
• Time stamping
CANopen communication CANopen communication objectsobjects
ELMB Course 19
ATLASDCS
Initial
Pre-operational
OFF
Power up
Boot up EMCY
OperationalSDO
PDO
NMT = Start
NMT = Reset
NMT = Set to Pre-Op
SDO
PDO
Stopped
NMT = Stop
NMT = Start
PDO
SDO
NMT = Reset
NMT = Stop
CANopen state modelCANopen state model
ELMB Course 20
ATLASDCS
NMT: change node state
0 cmd nodeId
cmd: 0x01 => Start 0x02 => Stop 0x80 => Set to pre-operational 0x81 => Reset 0x82 => Reset CAN communication
COB-ID 0 1 2
Understanding the ELMB Understanding the ELMB messages: NMTmessages: NMT
ELMB Course 21
ATLASDCS
SYNC: request synchronous inputs from nodes
0x80
COB-ID 0 1 2
Understanding the ELMB Understanding the ELMB messages: SYNCmessages: SYNC
ELMB Course 22
ATLASDCS
SDO: read node configuration; SDO Upload
0x600 + ID Sub-IdxIndex0x40
0x580 + ID Sub-IdxIndex data0 data1 data2 data3aaa
aaa: 0x4f => 1 byte read 0x4b => 2 bytes read 0x43 => 4 bytes read
request
Confirmation
Indication
Response
SDO ServerSDO Client
COB-ID 0 1 2 3 4 5 6 7
COB-ID 0 1 2 3 4 5 6 7
Understanding the ELMB Understanding the ELMB messages: SDOmessages: SDO
ELMB Course 23
ATLASDCS
SDO: write node configuration; SDO Download
0x600 + ID Sub-IdxIndex data0 data1 data2 data3aaa
0x580 + ID Sub-IdxIndex0x60
aaa: 0x2f => 1 byte read 0x2b => 2 bytes read 0x23 => 4 bytes read(If accessed values are unsigned)
request
Confirmation
Indication
Response
SDO ServerSDO Client
COB-ID 0 1 2 3 4 5 6 7
COB-ID 0 1 2 3 4 5 6 7
Understanding the ELMB Understanding the ELMB messages: SDOmessages: SDO
ELMB Course 24
ATLASDCS
Tx-PDO1: read digital inputs from the ELMB
0x180 + ID Port F Port A
COB-ID 0 1
Tx-PDO3: read analog inputs from the ELMB. “Multiplexed” PDO
0x380 + ID chN = 0 status
COB-ID 0 1
aaa bbb ccc ddd
Value in Volts
2 3 4 5
0x380 + ID chN = 63 status aaa bbb ccc ddd
• • •
Understanding the ELMB Understanding the ELMB messages: TPDOmessages: TPDO
ELMB Course 25
ATLASDCS
Rx-PDO1: write digital outputs from the ELMB
0x200 + ID Port C Port A
COB-ID 0 1
Understanding the ELMB Understanding the ELMB messages: RPDOmessages: RPDO
ELMB Course 26
ATLASDCS
All configuration changes are written to the RAM
Volatile memory, i.e. lost when the program is reinitialized, e.g. power cut
When the program is initialized, default configuration parameters are read from the EEPROM
In order to make your changes permanent, you must explicitly save them
Saving ELMB settingsSaving ELMB settings
ELMB Course 27
ATLASDCS
A Client/Server Architecture:– Server:
– Holds process data– Client
– Read/write/subscribe– Relation n-to-m.
Items and Groups:
– Server Address Space contains OPC Items
– Client: Organize OPC Items in groups
(active, polling-rate, dead-band etc).
OPC Client 1 OPC Client 2
OPC Group 1 OPC Group 1 OPC Group 2 OPC Group 1
Address Space
OPC Server 1
OPC Item
OPC ItemOPC Item
OPC ItemOPC Item
OPC Item
OPC Item OPC ItemOPC Item
OPC Item
Process Data Objects Process Data Objects
OPC Server 2
Address Space
Data Access Mechanism:– Synchronous.
– Asynchronous.– Refresh.
– Subscribe.
OLE for Process Control OLE for Process Control (OPC)(OPC)
ELMB Course 28
ATLASDCS
• Generic CAN and CANopen OPC server
• Can be used with other CAN or CANopen devices
• Additional functionality to ease the work with the ELMB
• Default configuration
• Configuration file describe the network topology
When the ELMB default configuration is used, the OPC server
implements a default address space which contains all OPC items
required by standard users
e.g. items for SYNC, NMT, some SDO, PDO for AI, DI and DO, NG, EMCY
ELMB/CANopen OPC ServerELMB/CANopen OPC Server
ELMB Course 29
ATLASDCS
ELMB OPC default ELMB OPC default configurationconfiguration
OPC Item Description OD Index, Subindex Type
<bus>.<node>.hwVersion Contains hardware version 1009, 0 VT_UI4
<bus>.<node>.swVersion ELMB software version 100A, 0 BSTR
<bus>.<node>.serialNumber Contains the serial number of the ELMB 3100, 0 VT_UI4
<bus>.<node>.guardTime Read only value set to 1000 (1s) 100C, 0 VT_UI2
<bus>.<node>.lifeTime Life guarding timeout in seconds 100D, 0 VT_UI1
<bus>.<node>.rate ADC conversion rate 2100, 2 VT_UI1
<bus>.<node>.range ADC range 2100, 3 VT_UI1
<bus>.<node>.mode ADC measurement mode 2100, 4 VT_UI1
<bus>.<node>.channelMax Highest ADC channel number in use 2100, 1 VT_UI1
<bus>.<node>.aiTransmissionType Transmission type for analog inputs 1802, 2 VT_UI1
<bus>.<node>.aiEventTimer Event timer for analog inputs 1802, 5 VT_UI2
<bus>.<node>.diDebounceTimer Debounce timer for digital inputs 2200, 0 VT_UI1
<bus>.<node>.diTransmissionType Transmission type for digital inputs 1800, 2 VT_UI1
<bus>.<node>.diEventTimer Event timer for digital inputs 1800, 5 VT_UI2
<bus>.<node>.digitalInEnable Enables asynchronous transmission of Digital Input signals 6005, 0 VT_BOOL
<bus>.<node>.initHigh Can be set to initialize digital outputs high after a hard reset 2300, 0 VT_UI1
<bus>.<node>.save Saves configuration to EEPROM 1010, 1 VT_UI4
<bus>.<node>.load Loads default configuration from EEPROM 1011, 1 VT_UI4
<bus>.<node>.Error Current value of the error register 1001, 0 VT_UI1
Items accessed via SDO
ELMB Course 30
ATLASDCS
ELMB OPC default ELMB OPC default configuration (2)configuration (2)
OPC Item Description Type
<bus>.<node>.State Integer value indicating current operating state of ELMB VT_UI1
<bus>.<node>.NMT Allows Network ManagemenT commands to be given to the ELMB VT_UI1
<bus>.<node>.bootupMessage Value increments when bootup message received from ELMB VT_UI4
<bus>.<node>.ai_# Analog Input Channel # - 0...63 VT_UI2/VT_UI4[1]
<bus>.<node>.di_F_# (#-0..7) Digital Inputs (ELMB Port F) VT_BOOL
<bus>.<node>.do_C_# (#-0...7) Digital Outputs (ELMB Port C) VT_BOOL
<bus>.<node>.do_A_# (#-0...7) Digital Outputs (ELMB Port A) VT_BOOL
<bus>.<node>.emergencyErrorCode Gives emergency error code of last emergency message VT_UI2
<bus>.<node>.specificErrorCodeByte1 First byte of specific error code given in last emergency message (actual byte 3 of emergency message)
VT_UI1
<bus>.<node>.specificErrorCodeByte2 Second byte of specific error code given in last emergency message (actual byte 4 of emergency message)
VT_UI1
<bus>.<node>.specificErrorCodeByte3 Third byte of specific error code given in last emergency message (actual byte 5 of emergency message)
VT_UI1
<bus>.<node>.specificErrorCodeByte4 Fourth byte of specific error code given in last emergency message (actual byte 6 of emergency message)
VT_UI1
<bus>.<node>.specificErrorCodeByte5 Fifth byte of specific error code given in last emergency message (actual byte 7 of emergency message)
VT_UI1
[1] The type of these items depends on the setFlag. If the setFlag is “counts” the type is VT_IU2, otherwise it is VT_UI4
Items not in the ELMB OD
ELMB Course 31
ATLASDCS
0x380 + ID chN = 11 status
COB-ID 0 1
aaa bbb ccc ddd
Value in Volts
2 3 4 5
ELMB/CANopen OPC ServerELMB/CANopen OPC Server
top related