NCD Device Communications Quick Start Guide

2012-08-29

: Controlanything Device Communications Quick Start Guide Device_Communications_Quick_Start_Guide QSG

Open the PDF directly: View PDF PDF.
Page Count: 2

DownloadNCD Device Communications  Quick Start Guide
Open PDF In BrowserView PDF
Quick Start Guide

Device
Communications
Communicating with NCD Device Command Sets

Incomplete Documentation

Copyright © 2012
National Control Devices
All Rights Reserved.
NOTICE: Portions of this Manual REQUIRE Internet Access
This manual will guide you through the setup and use of all Reactor Series relay controllers. Following this manual in the sequence outlined is absolutely essential to proper understanding and use of
Reactor Series Controllers. Please review the entire manual BEFORE contacting NCD technical support. NCD technical support staff will direct your questions to this manual when applicable.

Device Communications

NCD Controllers are always waiting for the user to send a command. When the command has finished execution, the
controller sends back a confirmation. For instance, if you want to turn on the first relay, you can send the following
command:
254

Enters Command Mode

108

Activates the First Relay

1

Applies this command to bank 1 of the relay controller

When the controller has finished executing the command, the controller will send back a confirmation byte. In the case
of command 254, 108, 1 the controller will send back an 85 to let you know that it has finished turning on the first relay
and it is ready for the next command.
Most of the time, we use decimal values for our command set. Some programmers prefer to use Hexadecimal format,
which is easy to translate. If you prefer to use Hex, then simply translate the decimal values to Hex format. In the case
of 254, 108, 1 the Hex format would be 0xFE 0x6C 0x01 (with a confirmation byte of 0x55).
We will designate the command instructions in the following format throughout our guides:
Send Bytes:
Function:
Decimal Values:
Hex Values
Receive Byte:

Byte 1:
Command
254
0xFE
Decimal:
Hex:

Byte 2:
Activate Relay
108
0x6C

Byte: 3
Bank
1
0x01

85
0x55

COMM Operator Examples:
254 108 1
Turn on first relay
NCD Component Library Command Method:
Not Yet Implemented

There is one very important rule that should be followed during communications using this method. Before
sending a command to the controller, it is absolutely essential that you clear the serial receive buffer. If you do NOT
clear the serial receive buffer, you will invariably run into the problem of unreliable or unexpected results. Data tends to
pile up in the Serial Receive Buffer, and when you ask the buffer for data, there’s a pretty good chance you will be reading old data if you do not clear the buffer. Because of this, we highly recommend all users to follow this procedure when
communicating to any NCD device:
1. Clear the Serial Receive Buffer
2. Send a Command
3. Wait for a Response
If your software is written to follow these rules, you will be rewarded with software that stays in reliable communications
with the device. If you skip any of these rules, your software will appear to have bugs that cannot be resolved.

This manual will guide you through the setup and use of all Reactor Series relay controllers. Following this manual in the sequence outlined is absolutely essential to proper understanding and use of
Reactor Series Controllers. Please review the entire manual BEFORE contacting NCD technical support. NCD technical support staff will direct your questions to this manual when applicable.

Page 2 Quick Start Guide: Device Communications

Regardless of the Communication technology you have chosen to use, all NCD Devices have a command set. This
command set can be used to control relays, program settings, read the status of inputs, read the status of relays, and
much more. This command set forms the basis for which all NCD devices interact with your favorite interface
technology.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 2
Language                        : en-US
Tagged PDF                      : Yes
Title                           : NCD Device Communications
Author                          : Ryan
Create Date                     : 2012:06:26 10:17:31-05:00
Modify Date                     : 2012:06:26 10:17:31-05:00
Producer                        : Microsoft® Publisher 2010
Creator                         : Microsoft® Publisher 2010
EXIF Metadata provided by EXIF.tools

Navigation menu