NATIONAL CONTROL DEVICES E3C Quick Start Guide Incomplete Documentation
Device Network Protocol
NATIONAL CONTROL DEVICES
E3C Device Network Protocol
National Control Devices, LLC PO Box 455 Osceola, MO 64776 Phone 417.646.5644 • Fax (866) 562-0406
© Copyright 2013 All Rights Reserved. Notice: Portions of this manual require internet access.
Table of Contents Introduction .............................................................................. 1 Enhanced Version..................................................................................... 1 NCD Base Station Software ..................................................................... 2
Base Station Software .............................................................. 3 E3C Command Set (Enhanced Version) .................................................. 4
E3C Command Set (Enhanced Version) Summary .................. 9 E3C Command Set (Standard Version).................................. 11 Software Control of Multiple NCD Devices ............................................. 11 The E3C Command Set (Standard Version) .......................................... 12 Extended E3C Commands Standard Version ........................................ 13
Technical Support ..................... Error! Bookmark not defined. Contact Information ..........................Error! Bookmark not defined. Notice: ....................................................... Error! Bookmark not defined.
F U S I O N
Chapter
S E R I E S
1
Introduction Enhanced Version
T
he E3C Command Set is used to network multiple controllers together using E3C Compatible communications modules. E3C is a very simple network protocol that allows you to enable and disable E3C devices so you can easily choose which device you are talking to. There are essentially two versions of E3C. Both versions work together, but there have been a few changes to the protocol. The latest version of E3C only allows you to have one device active at any given time. Older versions allowed you to have multiple devices active at one time, but this caused data collision that could not be resolved. The first part of this document explains the E3C Enhanced Networking Protocol which is the suggested protocol for newer devices. The second part gives the command set for the Standard version. The E3C Device Number should be stored using device configuration. Only one device should occupy each E3C device number for maximum of 256 devices in an E3C network.
1
F U S I O N
S E R I E S
NCD Base Station Software Use the NCD Base Station software to communicate with your connected E3C compatible communications modules. Run the Base Station software and select the correct COM port or IP Address. Then click on ‘E3C Device Networking Command Set’ as shown in the screen shot below.
2
F U S I O N
Chapter
S E R I E S
2
Base Station Software A. Use this slider to choose an E3C Device Number (choose a particular device you want to talk to). When reading an E3C device number, this slider will adjust and the number will be displayed to the right of the slider. B. Use this button to Enable the selected E3C Device ONLY. All other devices with other E3C device numbers will be ignored. C. Read the E3C Device Number stored in the controller. D. Discovers E3C Device Numbers in a E3C compatible network (Experimental Feature). E. Disable ALL E3C Devices. Use this function if you want to lock out access to all devices on an E3C network. NOTE: Please Use Device Configuration to Change the E3C Device Number of your controller.
A B C
E
D
3
F U S I O N
S E R I E S
E3C Command Set (Enhanced Version) Read Device Description Data from Controller
This command will get the following device description data from controller: Device ID Part 1 Device ID Part 2 Device Year of Designs Device Firmware Version E3C Device Number Note: This Command is Obsolete as more detailed information about the controller is available by reading various EEPROM memory locations. All ProXR Enhanced controllers will report back the same information, as this command was added for compatibility with ProXR standard controllers. Please see the EEPROM Memory May to obtain more detailed information about the capabilities of your particular device. Send Bytes:
Byte 1:
Byte 2:
Function: Decimal Values: Hex Values:
Command 254 0xFE
246 0xF6
Receive Byte:
Decimal: Hex:
6 0x06
0 0x00
212 0xD4
2 0x02
COMM Operator Examples:
254 246
Get Device Description Data from Controller NCD Component Library Command Method:
Not Yet Implemented
4
0 0x00
F U S I O N
S E R I E S
Read the E3C Device Number
This command will read the E3c device number from the controller. Send Bytes:
Byte 1:
Byte 2:
Function: Decimal Values: Hex Values:
Command 254 0xFE
247 0xF7
Receive Byte:
Decimal: Hex:
0-255 0x00-0xFF
COMM Operator Examples
254 247
Read the E3C Device Number from the Controller NCD Component Library Command Method
Not Yet Implemented
5
F U S I O N
S E R I E S
Discover E3C Device Numbers on the Network
This command tells all devices to report their device numbers. Each controller will report their device number using a time slot method which prevents data collision. Higher device numbers report back first. Lower device numbers report back last. We recommend having one device with a device number of 1 to signify the end of the discovery function. Each device will report back 3 bytes. The first byte is Header byte of 85. The second byte is a device number. The third byte is an 8-Bit Checksum value that equal Device Number +85. Your software will need to use the lower 8 bits to compare the checksum. Follow this method: 1. 2. 3. 4. 5.
Wait for a Header Byte to be Received Store the 2nd Byte in DevNumber Variable Store the 3rd Byte in CkSum Variable LogicalCKSum = (85 + DevNumber) And 255 If CKSum = LogicalCKSum then Data Packet is Valid
In Step 4, we use the Math function “And” to isolate the lower 8-bits of the computer value. The “And” function is supported in most programming languages. Send Bytes:
Byte 1:
Byte 2:
Byte 3:
Function: Decimal Values: Hex Values:
Command 254 0xFE
247 0xF7
1 0x01
Receive Bytes:
Decimal: Hex:
85 (HDR) 0x55
0-255(Dev#) 0x00-0xFF
0-255(CKSUM) 0x00-0xFF
COMM Operator Examples:
254 247 1
Discover E3C Device Numbers on the Network NCD Component Library Command Method:
Not Yet Implemented NOTE: This feature is experimental and has not been fully tested.
6
F U S I O N
S E R I E S
Discover E3C Device Numbers and Names on the Network
This command tells all devices to report their device numbers and names. Each controller will report their device number and name using a time slot method which prevents data collision. Higher device numbers report back first. Lower device numbers report back last. We recommend having one device with a device number of 0 to signify the end of the discovery function. Each device will report back 19 bytes. The first byte is a Header byte of 86. The second byte is a device number. The Next 16 Bytes contain the device name. The last byte is an 8-Bit Checksum value that equals 86 + Device Number + <Sum of 16 Name Bytes>. Your software will need to use the lower 8 bits to compare the checksum. Follow this method: 1. 2. 3. 4. 5. 6.
Wait for a Header Byte to be Received Store the 2nd Byte in DevNumber Variable Store Bytes 3 to 18 in an Array Store the Last Byte in CKSum Variable LogicalCKSum = (86 + DevNumber + Name Array Sum) And 255 If CkSum = Logical CKSum then Data Packet is Valid
In Step 5, we use the Math function “And” to isolate the lower 8 bits of the computed value. The “And” function is supported in most programming languages. Send Bytes:
Byte 1:
Byte 2:
Byte 3:
Function: Decimal Values: Hex Values:
Command 254 0xFE
247 0xF7
2 0x02
Receive Bytes:
Decimal: Hex:
86 (HDR) 0x55
0-255(Dev#) 0-255 (Name 1-16) 0-255 (CKSUM) 0x00-0xFF 0x00x0xFF 0x00-0xFF
COMM Operator Examples:
254 247 2
Discover E3C Device Numbers and Names on the Network NCD Component Library Command Method:
Not Yet Implemented NOTE: This feature is experimental and has not been fully tested.
7
F U S I O N
S E R I E S
Disable all E3C Devices
This command will disable all E3C devices. Send Bytes:
Byte 1:
Byte 2:
Function: Decimal Values: Hex Values:
Command 254 0xFE
249 0xF9
Receive Byte:
No Response
COMM Operator Examples:
254 249
Disable all E3C Devices NCD Component Library Command Method:
Not Yet Implemented Enable a Selected Device Number
This command will enable a selected device number (0-255) and disable all other controllers. This command will reply with its device number. For instance, if you send 254 252 108 to enable device 108, the controller with a device number of 108 will report back the device number 108. All other devices will be disabled and will not report anything back to the controller. Send Bytes:
Byte 1:
Byte 2:
Byte 3:
Function: Decimal Values: Hex Values:
Command 254 0xFE
252 0xFC
Device # 0-255 0x00-0xFF
Receive Bytes:
Decimal: Hex:
0-255 0x00-0xFF
COMM Operator Examples:
254 252 108
Enable device 108 and disable all other devices NCD Component Library Command Method
Not Yet Implemented
8
F U S I O N
S E R I E S
E3C Command Set (Enhanced Version) Summary Transmit
Command Description
254 246
Get Device Description Data from controller. Device ID Part 1 Device ID Part 2 Device Year of Design Device Firmware Version E3C Device Number Note: This Command is Obsolete, as more detailed information about the controller is available by reading various EEPROM Memory locations. All ProXR Enhanced controllers will report back the same information, as this command was added for compatibility with ProXR Standard Controllers. Please see the EEPROM Memory Map to obtain more detailed information about the capabilities of your particular device.
254 247
Read the E3C Device Number from the Controller.
254 247 1
Discover E3C Devices Numbers of the Network. This command tells all devices to report their device numbers. Each controller will report their device number by using a time slot method which prevents data collision. Higher device numbers report back first. Lower device numbers report back last. We recommend having one device with a device number of 0 to signify the end of the discovery function. Each device will report back 3 bytes. The first byte is a header byte of 85. The second byte is a device number. The third byte is an 8-bit Checksum value that equals Device Number + 85. Your Software will need to use the lower 8 bits to compare the checksum. Follow the method: 1) Wait for a Header Byte to be received. 2) Store the second Byte in DevNumber Variable 3) Store the 3rd byte in CkSum Variable. 4) LogicalCKSum=(85 + DevNumber) and 255. 5) If CkSum=LogicalCKSum then Data Packet is Valid. In step 4 we use the Math function “And” to isolate the lower 8 bits of the computed value. The “And” function is a math function supported in most programming languages and is sometimes called using the “&” symbol. NOTE: This feature is experimental and has not been fully tested.
9
Receive
6 0 212 2 0
0-255
85 (HDR) 0-255 (Dev#) 0-255 (CKSum)
F U S I O N
Transmit
254 247 2
S E R I E S
Command Description
Receive
Discover E3C Device Numbers and Names on the Network. This command tells all devices to report their device numbers and names. Each controller will report their device number and name using a time slot method which prevents data collision. Higher device numbers report back first. Lower device numbers report back last. We recommend having one device with a device number of 0 to signify the end of the discovery function. Each device will report back 19bytes. The first byte is a Header byte of 86. The second byte is a device number. The next 16 bytes contain the device name. The last byte is a 8 bit Checksum value that equals 86 + Device Number + <Sum of 16 Name Bytes>. Your software will need to use the lower 8 bits to compare the checksum. Follow this method: 1) Wait for a Header Byte to be Received. 2) Store the 2nd Byte in DevNumber Variable. 3) Store Bytes 3 to 18 in an Array 4) Store the Last Byte in CKSum Variable 5) LogicalCKSum=(86 + DevNumber + Name Array Sum) and 255CKSum then Data Packet is Valid In step 5 we use the Math function “And” to isolate the lower 8 bits of the computed value. The “And” function is supported in most programming languages.
86 (HDR) 0-255 (Dev#) 0-255 (Name1) 0-255 (Name2) 0-255 (Name3) 0-255(Name4) 0-255(Name5) 0-255(Name6) 0-255(Name7) 0-255(Name8) 0-255(Name9) 0-255(Name10) 0-255(Name11) 0-255(Name12) 0-255(Name13) 0-255(Name14) 0-255(Name15) 0-255(Name16) 0-255(CKSum)
NOTE: This feature is experimental and has not been fully tested.
254 249 254 252 0-255
Disable all E3C Devices.
No Response
Enable a Selected Device Number (0-255) and disable all other controllers. The command will reply with its device number. For instance, if you send 254, 252, 108 to enable device 108, the controller with a device number of 108 will report back the device number 108. All other devices will be disabled and will not report anything back to the controller.
10
0-255
F U S I O N
S E R I E S
E3C Command Set (Standard Version) Software Control of Multiple NCD Devices The E3C command set allows you to control up to 256 NCD devices from a single serial port. It is okay to mix different types of devices, as long as the devices are E3C compliant. The R4x/R8x Pro relay controllers support the full set of E3C commands, plus a set of extended commands for storing and recalling the device number. How does E3C Work?
First of all, each device must be assigned a device number from 0 to 255. The ProXR Controller must be programmed with a device number, which is accomplished using the “Store Device Number” command shown below. E3C stands for Enabled 3-Wire Communication. Put simply, all devices will respond to your commands when powered up. Using the E3C command set, you can specify which devices will listen and which devices will ignore your commands. Note that E3C commands are never ignored by any device, regardless of the commands you send to the controller. The number to the left of each command indicated the ASCII character code that must be sent to issue the command. All commands must be preceded with ASCII character code 254 to place the device in command mode.
11
F U S I O N
S E R I E S
The E3C Command Set (Standard Version) The ProXR Series Controllers support an extensive command set, used to control relays, set operation modes, and store and recall relay status. Most users will only use a few of the function built into this controller. The best way to learn the capabilities of the ProXR series is to carefully read through the command set. The “plain English” examples provide a quick, easy to understand definition of each command. Enable or disable all devices: Send Bytes:
Byte 1:
Byte 2:
Byte 3:
Function: Decimal Values: Hex Values
Command 254 0xFE
Enable /Disable Devices 248-253 0xF8-0xFD
Device
Receive Byte:
Decimal: Hex:
85 0x55
COMM Operator Examples:
254 248 254 249 254 250 device 254 251 device 254 252 device 254 253 device
Tell all devices to respond to your commands. Tell all devices to ignore your commands. Tell a specific device to listen to your commands. Tell a specific device to ignore your commands. Tell a specific device to listen to your commands, all other device will ignore your commands. Tell a specific device to ignore your commands, all others will listen.
NCD Component Library Command Method:
Not Yet Implemented
ProXR Version NOTICE: ProXR Series Controllers only allow you to use the “Store E3C Device Number” function while in “Configuration Mode”. This prevents accidental modification of the E3C deice number under normal operation if an incorrect series of commands are send to the controller. So make sure the ProXR is in configuration mode when storing the E3C device number. Simply turn off all DIP Switches and Power Cycle the controller to enter the configuration mode.
12
F U S I O N
S E R I E S
Extended E3C Commands Standard Version The ProXR Series Controllers support three additional E3C commands which should only be used when a single device is attached to your serial port. Extended commands will report back to the computer. Store Device Number:
This command stores the device number into the controller. The device number takes effect immediately. The enabled/disabled status of the device is unchanged. Send Bytes:
Byte 1:
Byte 2:
Function: Decimal Values: Hex Values:
Command 254 0xFE
Store Device Number 255 0xFF
Receive Bytes:
Decimal: Hex:
85 0x55
Recall Device Information
The first command reports back 4 bytes of data: ProXR E3C Device Number (Device ID Part 1: 1 and Device ID Part 2: 0) ProXR Firmware Version: 17 (or newer) ProXR Year of Firmware Production: 205 (or newer) Send Bytes:
Byte 1:
Byte 2:
Function: Decimal Values: Hex Values:
Command 254 0xFE
Recall/Display Device Information 246-247 0xF6-0xF7
Receive Byte:
Decimal: Hex:
85 0x55
COMM Operator Examples:
254 246
Recall Device Information: Device ID Number Part 1, Device ID Number Part 2, Firmware Version, Year of Manufacture (205=2005, 206=2006)
254 247
DisplayE3C Device Number.
13
F U S I O N
Chapter
S E R I E S
3
Technical Support
T
echnical support is available through our website, controlanything.com. Support is the way we connect NCD engineers to our customers.
Click on the Support tab at the top of any page on our website to be taken to the Forum page. Here you can publicly post or review problems that customers have had, and learn about our recommended solutions.
Our engineers monitor questions and respond continually throughout the day. Before requesting telephone technical support, we ask that customers please try to resolve their problems through Support first. However, for persistent problems, NCD technical support engineers will schedule a phone consultation.
14
F U S I O N
S E R I E S
Contact Information National Control Devices, LLC PO Box 455 Osceola, MO 64776 417-646-5644 phone 866-562-0406 fax Open 9 a.m. - 4 p.m. CST Like “National Control Devices” on Facebook, and follow us on Twitter @ControlAnything. All orders must be placed online at our website, www.controlanything.com
Notice: The only authorized resellers of NCD products are
www.controlanything.com www.relaycontrollers.com www.relaypros.com
All other websites are not authorized dealers; we have noticed some retailers offering our products fraudulently.
Copyright © 2013 National Control Devices All Rights Reserved. 15