You are using an unsupported browser!

Please upgrade your version of IE to at least 9, or use a modern browser such as Chrome or Firefox.

ProXR is a standard set of relay control commands that allow users to control relays by sending bytes of data.  Turn relays on or off, trigger timers, flashers, and control relay groups using the ProXR command set.  This document will guide you through everything you need to know to start using NCD ProXR series controllers.

Introduction

Using Base Station with ProXR USB Relay Controllers

This tutorial will help you learn to use our Base Station graphical user interface to control ProXR USB Relay Controllers.  Base Station is the software we use to demonstrate the features of our devices.  Base Station works by identifying the controller.  This software will generate a list of compatible control panels and demonstrate each individual feature.  This tutorial will display the bytes of data required to control our entire line of USB Relay Controllers.  This makes integration into your own software effortless, regardless of language or platform.  NCD USB Relay Controllers will act as a virtual com port on your PC.  Simply open the port and send your data to begin controlling relays.  Download Base Station Software from //ncd.io/start. Base Station software is compatible with Windows 8 and Windows 10.  The latest Dot NET framework must be installed when working with older operating systems.

USB Relay Controllers: A Complete Tutorial

This tutorial covers all ProXR series controllers.  We will be using USB ProXR and ProXR Lite Series controllers for this tutorial.   Base Station software supports other interface technologies.  USB Controllers mount as a Virtual COM port on your computer.  Most Windows PCs include the drivers necessary to talk to our controllers; however, a comprehensive list of supported drivers and operating systems are available at http://www.ftdichip.com/FTDrivers.htm

Once the controller is plugged into the USB port of your computer, the USB LED should light on the USB interface module plugged into the controller.  If this light does not illuminate, your computer has not properly enumerated the USB driver (please see the link above install the latest drivers).

Communications to any NCD controller is as easy as sending bytes out the serial port.  The default baud rate for all USB devices we manufacture is 115.2K Baud.

Back To Top

Relay Control

Relay Control Commands

This section will demonstrate basic relay control commands, reading the status of relays, controlling all relays at once, including reversing and inverting relay status.  The video above demonstrates ProXR commands on a 4-Channel USB relay board.  This particular controllers is a ProXR Lite series, which includes 8 analog to digital inputs and USB interface module that may be replaced by a WiFi, Bluetooth, RS-232, Dropnet, Ethernet, Ethernet web page, or industrial wireless (Digi 802.15.4 or 900HP series) communications module.

Here, you will see the word “Bank”.  A bank is simply a group of 8 relays.  Bank 1 refers to the first group of 8 relays.  Bank 2 refers to the second group of 8 relays (for larger controllers).  ProXR controllers have firmware support for 32 Banks of relays, though it may not be possible to install 32 banks of relays for all installations.  Sometimes it is useful to send commands to a bank, so a Bank value is often included as part of the command.  Using a Bank value of 0 will apply a command to all banks of relays.

The tables below show sample commands found in this tutorial.

Back To Top

Turning Relays Off in All Relay Banks

TX: FUNCTION: RX:
170 3 254 100 0 15 Turn Off Relay 1 in All Relay Banks 170 1 85 0
170 3 254 101 0 16 Turn Off Relay 2 in All Relay Banks 170 1 85 0
170 3 254 102 0 17 Turn Off Relay 3 in All Relay Banks 170 1 85 0
170 3 254 103 0 18 Turn Off Relay 4 in All Relay Banks 170 1 85 0
170 3 254 104 0 19 Turn Off Relay 5 in All Relay Banks 170 1 85 0
170 3 254 105 0 20 Turn Off Relay 6 in All Relay Banks 170 1 85 0
170 3 254 106 0 21 Turn Off Relay 7 in All Relay Banks 170 1 85 0
170 3 254 107 0 22 Turn Off Relay 8 in All Relay Banks 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Turning Relays On in All Relay Banks

TX: Function: RX:
170 3 254 108 0 23 Turn On Relay 1 in All Relay Banks 170 1 85 0
170 3 254 109 0 24 Turn On Relay 2 in All Relay Banks 170 1 85 0
170 3 254 110 0 25 Turn On Relay 3 in All Relay Banks 170 1 85 0
170 3 254 111 0 26 Turn On Relay 4 in All Relay Banks 170 1 85 0
170 3 254 112 0 27 Turn On Relay 5 in All Relay Banks 170 1 85 0
170 3 254 113 0 28 Turn On Relay 6 in All Relay Banks 170 1 85 0
170 3 254 114 0 29 Turn On Relay 7 in All Relay Banks 170 1 85 0
170 3 254 115 0 30 Turn On Relay 8 in All Relay Banks 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Turning Individual Relays Off in Selected Relay Banks

TX: Function: RX:
170 3 254 100 1 16 Turn Off Relay 1 in Bank 1 170 1 85 0
170 3 254 101 1 17 Turn Off Relay 2 in Bank 1 170 1 85 0
170 3 254 102 1 18 Turn Off Relay 3 in Bank 1 170 1 85 0
170 3 254 103 1 19 Turn Off Relay 4 in Bank 1 170 1 85 0
170 3 254 104 1 20 Turn Off Relay 5 in Bank 1 170 1 85 0
170 3 254 105 1 21 Turn Off Relay 6 in Bank 1 170 1 85 0
170 3 254 106 1 22 Turn Off Relay 7 in Bank 1 170 1 85 0
170 3 254 107 1 23 Turn Off Relay 8 in Bank 1 170 1 85 0
170 3 254 100 2 17 Turn Off Relay 1 in Bank 2 170 1 85 0
170 3 254 100 3 18 Turn Off Relay 1 in Bank 3 170 1 85 0
170 3 254 100 4 19 Turn Off Relay 1 in Bank 4 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Turning Individual Relays On in Selected Relay Banks

TX: Function: RX:
170 3 254 108 1 24 Turn On Relay 1 in Bank 1 170 1 85 0
170 3 254 109 1 25 Turn On Relay 2 in Bank 1 170 1 85 0
170 3 254 110 1 26 Turn On Relay 3 in Bank 1 170 1 85 0
170 3 254 111 1 27 Turn On Relay 4 in Bank 1 170 1 85 0
170 3 254 112 1 28 Turn On Relay 5 in Bank 1 170 1 85 0
170 3 254 113 1 29 Turn On Relay 6 in Bank 1 170 1 85 0
170 3 254 114 1 30 Turn On Relay 7 in Bank 1 170 1 85 0
170 3 254 115 1 31 Turn On Relay 8 in Bank 1 170 1 85 0
170 3 254 108 2 25 Turn On Relay 1 in Bank 2 170 1 85 0
170 3 254 108 3 26 Turn On Relay 1 in Bank 3 170 1 85 0
170 3 254 108 4 27 Turn On Relay 1 in Bank 4 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Set the Status of All Relays in Selected Bank

TX: Function: RX:
170 3 254 129 0 44 Turn All Relays Off in All Banks 170 1 85 0
170 3 254 129 1 45 Turn All Relays Off in Bank 1 170 1 85 0
170 3 254 129 2 46 Turn All Relays Off in Bank 2 170 1 85 0
170 3 254 129 3 47 Turn All Relays Off in Bank 3 170 1 85 0
170 3 254 129 4 48 Turn All Relays Off in Bank 4 170 1 85 0
170 3 254 130 0 45 Turn All Relays On in All Banks 170 1 85 0
170 3 254 130 1 46 Turn All Relays On in Bank 1 170 1 85 0
170 3 254 130 2 47 Turn All Relays On in Bank 2 170 1 85 0
170 3 254 130 3 48 Turn All Relays On in Bank 3 170 1 85 0
170 3 254 130 4 49 Turn All Relays On in Bank 4 170 1 85 0
170 3 254 131 0 46 Invert the Status of All Relays in All Relay Banks 170 1 85 0
170 3 254 131 1 47 Invert the Status of All Relays in Bank 1 170 1 85 0
170 3 254 131 2 48 Invert the Status of All Relays in Bank 2 170 1 85 0
170 3 254 131 3 49 Invert the Status of All Relays in Bank 3 170 1 85 0
170 3 254 131 4 50 Invert the Status of All Relays in Bank 4 170 1 85 0
170 3 254 132 0 47 Reverse the Pattern of All Relays in All Relay Banks 170 1 85 0
170 3 254 132 1 48 Reverse the Pattern of All Relays in Bank 1 170 1 85 0
170 3 254 132 2 49 Reverse the Pattern of All Relays in Bank 2 170 1 85 0
170 3 254 132 3 50 Reverse the Pattern of All Relays in Bank 3 170 1 85 0
170 3 254 132 4 51 Reverse the Pattern of All Relays in Bank 4 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Set the Status of All Relays in Selected Bank

The following table shows a single command used with different parameters.  The purpose of this command is to set the status of 8 relays simultaneously.  The 5th byte of this command indicates the binary pattern for relay control.  The 6th byte of this command applies this value to a single bank (Bank Value of 1-32) or all banks simultaneously (Bank Value of 0).

TX: Function: RX:
170 4 254 140 0 0 56 Turn Off All Relays in All Relay Banks 170 1 85 0
170 4 254 140 85 0 141 Turn On All ODD Relays in All Relay Banks 170 1 85 0
170 4 254 140 170 0 226 Turn On All EVEN Relays in All Relay Banks 170 1 85 0
170 4 254 140 255 0 55 Turn On All Relays in All Relay Banks 170 1 85 0
170 4 254 140 0 1 57 Turn Off All Relays in Bank 1 170 1 85 0
170 4 254 140 85 1 142 Turn On All ODD Relays in Bank 1 170 1 85 0
170 4 254 140 170 1 227 Turn On All EVEN Relays in Bank 1 170 1 85 0
170 4 254 140 255 1 56 Turn On All Relays in Bank 1 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Controlling Individual Relays

Controlling individual relays refers to controlling relays by their designated numeric assignment rather than using the relay bank system we normally use.  These commands were included as an alternative method of controlling relays to help suit the preferences of a particular user.  Referring to relays by their numeric value may be easier for some users to comprehend, as relay 1 is the first relay on the board and relay 32 is the last relay on the board when working with a 32-channel relay controller.  This section also includes relay selector command, which can be used to select the activation of one particular relay, ensuring all other relays remain off.

Back To Top

Controlling Individual Relay Commands

The following commands make use of a RelayNumber parameter, which are always 16-bit values.  The RelayNumber is a the number of the relay you would like to control.  This RelayNumber variable is converted into LSB and MSB values, which is subsequently communicated to the controller.

RelayNumber = The Relay Number you would like to control.

LSB = ((RelayNumber) And 255)
MSB = (((RelayNumber) And 65280) / 255)

Since most users will be working with less than 256 relays, the following substitutions can be made to help simplify this process:

LSB = Relay Number (0 to 255)
MSB = 0

Should you need to speak to more than 256 relays, changing the MSB to 1 will only speak to relays above 256.  The following values will only talk to relays 256 to 511:

LSB = Relay Number (0 to 255)
MSB = 1 (This will send the LSB above to relays 256 through 512)

TX: LSB MSB FUNCTION: RX:
170 4 254 44 0 0 216 Read the Status of Relay 1 170 1 0 171
170 4 254 44 255 0 215 Read the Status of Relay 256 170 1 0 171
170 4 254 44 0 1 217 Read the Status of Relay 257 170 1 0 171
170 4 254 46 0 0 218 Turn Off All Relays then Activate Relay 1 170 1 85 0
170 4 254 46 255 0 217 Turn Off All Relays then Activate Relay 256 170 1 85 0
170 4 254 46 0 1 219 Turn Off All Relays then Activate Relay 257 170 1 85 0
170 4 254 47 0 0 219 Turn Off Relay 1 170 1 85 0
170 4 254 47 255 0 218 Turn Off Relay 256 170 1 85 0
170 4 254 47 0 1 220 Turn Off Relay 257 170 1 85 0
170 4 254 48 0 0 220 Turn On Relay 1 170 1 85 0
170 4 254 48 255 0 219 Turn On Relay 256 170 1 85 0
170 4 254 48 0 1 221 Turn On Relay 257 170 1 85 0

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

Relay Toggle Commands

Toggle commands are used to toggle the state of a relay.  If a relay is off, the relay will activate when the toggle command is sent.  Similarly, if the toggle command is sent again, the relay turn off.
Toggle commands will require ProXR V3.9 firmware or later.

TX: CK FUNCTION: RX:
170 5 254 47 0 0 1 221 Toggle Relay 1 170 1 85 0
170 5 254 47 1 0 1 222 Toggle Relay 2 170 1 85 0
170 5 254 47 2 0 1 223 Toggle Relay 3 170 1 85 0
170 5 254 47 3 0 1 224 Toggle Relay 4 170 1 85 0
170 5 254 47 4 0 1 225 Toggle Relay 5 170 1 85 0
170 5 254 47 5 0 1 226 Toggle Relay 6 170 1 85 0
170 5 254 47 6 0 1 227 Toggle Relay 7 170 1 85 0
170 5 254 47 7 0 1 228 Toggle Relay 8 170 1 85 0

Back To Top

Relay Grouping

Simulating Larger Relays with Smaller Relays

Relay grouping commands can help you save money, and in some cases, a lot of money.  Simulating large expensive relays with smaller low-cost relays is an excellent way to provide greater functionality at a much lower cost point.  Relay grouping is the process of controlling relays in groups rather than individual relays.  For instance, we do not offer 20-Amp DPDT relay.  Locating such a relay may be impossible or expensive, so instead, you can simulate a 20-Amp DPDT relay using two 20-Amp SPDT relays for a much more reasonable and accessible price.  Another common request we receive is a 10-Amp DPDT relay controller.  DPDT relays with a 10 Amp rating are more accessible, but still very costly.  Again, we can use a relay grouping command to simulate a 10-Amp DPDT relay using two 10-Amp SPDT relays.  You can really start saving money if you have needs for exotic relay configurations, such as 3PDT, 4PDT, or even 8PDT (if there is such a thing).

Relay grouping introduces a “Neighbor” variable to standard ProXR relay control commands.  The Neighbor parameter is used to define how many Neighboring relays you would like to apply to a relay control command.  Here’s an example:

Standard Command for Activating Relay 1:
170 3 254 108 1 24

Standard Command for Activating Relay 1 + 1 Neighbor (2 SPDT Relays to Simulate a DPDT Relay):
170 4 254 108 1 1 26

Back To Top

Relay Grouping Commands

The following relay grouping commands can be used to activate relays in groups, simulating DPDT, 3PDT, 4DPDT, and up to 8PDT relays using low-cost SPDT relays.  Note the Neighbor Parameter (N) has a maximum allowed value of 7.  Also note the (N) value cannot extend into the next bank.  For instance, Relay 1 has up to 7 neighbors, but Relay 8 has no neighbors because Relay number 9 is located in the next relay bank (Bank 2).  Here is a table of Neighbors allowed for each relay:

RELAY MAX NEIGHBORS
1 7
2 6
3 5
4 4
5 3
6 2
7 1
8 0

Here are a few examples that properly apply neighbors:

TX: N CK DPDT SIMULATION FUNCTION WITH 1 NEIGHBOR: RX:
170 4 254 108 1 1 26 Activate Relay 1 and 2 Simultaneously 170 1 85 0
170 4 254 110 1 1 28 Activate Relay 3 and 4 Simultaneously 170 1 85 0
170 4 254 112 1 1 30 Activate Relay 5 and 6 Simultaneously 170 1 85 0
170 4 254 114 1 1 32 Activate Relay 7 and 8 Simultaneously 170 1 85 0
170 4 254 100 1 1 18 Deactivate Relay 1 and 2 Simultaneously 170 1 85 0
170 4 254 102 1 1 20 Deactivate Relay 3 and 4 Simultaneously 170 1 85 0
170 4 254 104 1 1 22 Deactivate Relay 5 and 6 Simultaneously 170 1 85 0
170 4 254 106 1 1 24 Deactivate Relay 7 and 8 Simultaneously 170 1 85 0
TX: N 3PDT SIMULATION FUNCTION WITH 2 NEIGHBORS: RX:
170 4 254 108 1 2 27 Activate Relay 1,2,3 Simultaneously 170 1 85 0
170 4 254 111 1 2 30 Activate Relay 4,5,6 Simultaneously 170 1 85 0
170 4 254 100 1 2 19 Deactivate Relay 1,2,3 Simultaneously 170 1 85 0
170 4 254 103 1 2 22 Deactivate Relay 4,5,6 Simultaneously 170 1 85 0
TX: N 4PDT SIMULATION FUNCTION WITH 3 NEIGHBORS: RX:
170 4 254 108 1 3 28 Activate Relay 1,2,3,4 Simultaneously 170 1 85 0
170 4 254 112 1 3 32 Activate Relay 5,6,7,8 Simultaneously 170 1 85 0
170 4 254 100 1 3 20 Deactivate Relay 1,2,3,4 Simultaneously 170 1 85 0
170 4 254 104 1 3 24 Deactivate Relay 5,6,7,8 Simultaneously 170 1 85 0
TX: N 8PDT SIMULATION FUNCTION WITH 7 NEIGHBORS: RX:
170 4 254 108 1 7 32 Activate Relay 1-8 Simultaneously 170 1 85 0
170 4 254 100 1 7 24 Deactivate Relay 1-8 Simultaneously 170 1 85 0

Back To Top

Relay Flashers

Relay Flashers: Flashing a Relay

Flashing a Relays is the process of turning a relay on and off in the background while the controller processes other tasks.  Users are free to handle other relay control operations while relays are flashing.  Relay flashers make it easy to handle turn signal, road sign, and warning light applications with minimal integration time.  There are 16 Relay Flashers, allowing 16 relays to flash simultaneously.  Relay Flashers allow you to set the flash speed (S), which is applied to all Flashers (it is not possible to have each relay operating at a different flash rate).

Individual Flashers (F) may be turned On or Off (O) using the commands shown below.

TX: S CK FUNCTION: FLASHER SPEED RX:
170 4 254 45 0 0 217 Sets All Flashers to Fastest Speed 170 1 85 0
170 4 254 45 0 50 11 Sets All Flashers to Slow Speed 170 1 85 0
170 4 254 45 0 128 89 Sets All Flashers to Very Slow Speed 170 1 85 0
170 4 254 45 0 255 216 Sets All Flashers to Slowest Speed 170 1 85 0
TX: F O CK FUNCTION: TURN FLASHERS ON AND OFF RX:
170 4 254 45 1 0 218 Turn Off Flasher 1 170 1 85 0
170 4 254 45 1 1 219 Turn On Flasher 1 170 1 85 0
170 4 254 45 2 0 219 Turn Off Flasher 2 170 1 85 0
170 4 254 45 2 1 220 Turn On Flasher 2 170 1 85 0
170 4 254 45 3 0 220 Turn Off Flasher 3 170 1 85 0
170 4 254 45 3 1 221 Turn On Flasher 3 170 1 85 0
170 4 254 45 4 0 221 Turn Off Flasher 4 170 1 85 0
170 4 254 45 4 1 222 Turn On Flasher 4 170 1 85 0
170 4 254 45 5 0 222 Turn Off Flasher 5 170 1 85 0
170 4 254 45 5 1 223 Turn On Flasher 5 170 1 85 0
170 4 254 45 6 0 223 Turn Off Flasher 6 170 1 85 0
170 4 254 45 6 1 224 Turn On Flasher 6 170 1 85 0
170 4 254 45 7 0 224 Turn Off Flasher 7 170 1 85 0
170 4 254 45 7 1 225 Turn On Flasher 7 170 1 85 0
170 4 254 45 8 0 225 Turn Off Flasher 8 170 1 85 0
170 4 254 45 8 1 226 Turn On Flasher 8 170 1 85 0
170 4 254 45 9 0 226 Turn Off Flasher 9 170 1 85 0
170 4 254 45 9 1 227 Turn On Flasher 9 170 1 85 0
170 4 254 45 10 0 227 Turn Off Flasher 10 170 1 85 0
170 4 254 45 10 1 228 Turn On Flasher 10 170 1 85 0
170 4 254 45 11 0 228 Turn Off Flasher 11 170 1 85 0
170 4 254 45 11 1 229 Turn On Flasher 11 170 1 85 0
170 4 254 45 12 0 229 Turn Off Flasher 12 170 1 85 0
170 4 254 45 12 1 230 Turn On Flasher 12 170 1 85 0
170 4 254 45 13 0 230 Turn Off Flasher 13 170 1 85 0
170 4 254 45 13 1 231 Turn On Flasher 13 170 1 85 0
170 4 254 45 14 0 231 Turn Off Flasher 14 170 1 85 0
170 4 254 45 14 1 232 Turn On Flasher 14 170 1 85 0
170 4 254 45 15 0 232 Turn Off Flasher 15 170 1 85 0
170 4 254 45 15 1 233 Turn On Flasher 15 170 1 85 0
170 4 254 45 16 0 233 Turn Off Flasher 16 170 1 85 0
170 4 254 45 16 1 234 Turn On Flasher 16 170 1 85 0

Back To Top

Relay Flashers with Timers

Relay Timers and Flashers are directly connected, meaning Relay Timer 1 is directly connected to Flasher 1.  Similarly, Timer 2 is connected to Flasher 2.  This makes it possible to flash a relay for a period of time using a pair of commands.  The following commands demonstrate Flash Timer features working together.

Start by turning on Flasher 1:

TX: CK FUNCTION: RELAY FLASHERS WITH TIMERS RX:
170 4 254 45 1 1 219 Step 1: Turn On Flasher 1 170 1 85 0

Next, Activate Timer 1:

TX: CK FUNCTION: ACTIVATE TIMER 1 RX:
170 6 254 50 50 0 0 10 28 Activate Timer 1 170 1 85 0

When the timer expires, the relay flasher will be canceled.  Note that all 16 timers are connected to all 16 flashers in this same way.

Back To Top

Relay Refreshing

Relay Refreshing: Automatic and Manual Modes

This video demonstrates a 16-Channel relay board with a USB interface module installed.  By default, ProXR controllers automatically refresh relays.  When automatic relay refreshing is turned off, the relays will not change state when relay control commands are sent.  Instead, only the relay memory will change.  A separate relay refreshing command must be sent to make the controller update the status of the physical relays.  This allows users to send many relay control commands to the controller in any order, then refresh all relays simultaneously.

Back To Top

Relay Refreshing Commands

TX: FUNCTION: RX:
170 2 254 25 195 Turn On Automatic Relay Refreshing 170 1 85 0
170 2 254 26 196 Turn Off Automatic Relay Refreshing 170 1 85 0
170 2 254 37 207 Manually Refresh All Relay Banks 170 1 85 0
170 2 254 36 206 Read the Automatic Relay Refreshing Status 170 1 0 171

Back To Top

Reading Relay Status

Reading the Status of Relays

TX: Function: RX:
170 3 254 116 1 32 Read the On/Off Status of Relay 1 in Bank 1 170 1 0 171
170 3 254 117 1 33 Read the On/Off Status of Relay 2 in Bank 1 170 1 0 171
170 3 254 118 1 34 Read the On/Off Status of Relay 3 in Bank 1 170 1 0 171
170 3 254 119 1 35 Read the On/Off Status of Relay 4 in Bank 1 170 1 0 171
170 3 254 120 1 36 Read the On/Off Status of Relay 5 in Bank 1 170 1 0 171
170 3 254 121 1 37 Read the On/Off Status of Relay 6 in Bank 1 170 1 0 171
170 3 254 122 1 38 Read the On/Off Status of Relay 7 in Bank 1 170 1 0 171
170 3 254 123 1 39 Read the On/Off Status of Relay 8 in Bank 1 170 1 0 171
170 3 254 124 1 40 Read the On/Off Status of All Relays in Bank 1 170 1 0 171

Commands Above are in Decimal Format using API Mode. TX = Bytes Sent to the Controller RX = Bytes Received from the Controller.  Note Bytes Received May be Different for Some Commands.

Back To Top

ProXR Scratchpad Memory

Scratchpad Memory

Scratchpad Memory is used to store 8 user defined bytes of data.  Scratchpad Memory can be used for anything, such as a location, serial number, or other type of identifier.  The values stored do not affect the operation of the controller, as this memory is specifically for user-defined purposes.  Please note, the controller MUST be set to Configuration mode to write to Scratchpad Memory.  The following commands will demonstrate reading and writing data from scratchpad memory.  Memory Location (L) and the return Value (V) are identified in the table below:

TX: L FUNCTION: RX: V
170 3 254 51 1 223 Read Location 1 170 1 1 172
170 3 254 51 2 224 Read Location 2 170 1 2 173
170 3 254 51 3 225 Read Location 3 170 1 3 174
170 3 254 51 4 226 Read Location 4 170 1 4 175
170 3 254 51 5 227 Read Location 5 170 1 5 176
170 3 254 51 6 228 Read Location 6 170 1 6 177
170 3 254 51 7 229 Read Location 7 170 1 7 178
170 3 254 51 8 230 Read Location 8 170 1 8 179

The following commands demonstrate how to write data to Scratchpad Memory.  Memory Location (L) has a possible value of 1 through 8 while Data (D) has a possible value of 0 to 255 (8-Bit).

TX: L D FUNCTION: RX:
170 4 254 52 1 1 225 Write Location 1 170 1 85 0
170 4 254 52 2 2 226 Write Location 2 170 1 85 0
170 4 254 52 3 3 227 Write Location 3 170 1 85 0
170 4 254 52 4 4 228 Write Location 4 170 1 85 0
170 4 254 52 5 5 229 Write Location 5 170 1 85 0
170 4 254 52 6 6 230 Write Location 6 170 1 85 0
170 4 254 52 7 7 231 Write Location 7 170 1 85 0
170 4 254 52 8 8 232 Write Location 8 170 1 85 0

Back To Top

Relay Timers

Relay Timers

Relay Timers are used to automatically control relays for applications that might require failsafe control.  For instance, controlling a relay using a standard relay control command may prove dangerous.  Instead, timers can be used to explicitly specify the duration of time a relay should be activated.  Using relay timer commands, users may tell a relay to turn on for 5 minutes.  Should the computer fail to communicate with the controller after 5 minutes, the relay will automatically shut off.  To extend this analogy, users may repeatedly tell a relay to turn on for 30 seconds.  The relay will stay on as long as the timer command is sent within 30 seconds.  If the computer stops sending the timer command, the relay will turn off after 30 seconds, acting as a failsafe switch to control loads that may be time sensitive.

ProXR controllers include 16 timers, each of which can have their own duration of time in Hours (HR) Minutes (MN) Seconds (SC).  Each Timer can control any Relay (R) using numeric ordering (the first relay is relay 0).  Two types of timers are supported, Duration and Pulse.  A Duration timer is a timer that activates a relay for a duration of time, then turns the relay off once the time has expired.  A pulse timer is a timer that pulses a relay only after the elapsed time has expired.  Pulse timers are useful for automatic gate control or garage door opening applications.  Duration timers are controlled using a (T) value of 50-65 as indicated in the table below.  Pulse timers are activated using a (T) value of 70-85.

Timers are simulated in firmware, and may not be suitable for applications that require precision accuracy.  Similarly, each timer shares the same time base, introducing a margin of error of 1 second when activating timers at random.  Perhaps the biggest technical question we receive regarding timers is a simple misunderstanding between the (T) and (R) columns in the table below.  All controllers are equipped with 16 timers, but different controllers are equipped with different numbers of physical relays.  A timer and a relay are not equal, but it may be helpful to use equal values as you learn.  For instance, always control the first relay with timer 0, the second relay with timer 1, etc.

For some users, a 32 channel relay controller may seem limited with only 16 timers.  However, any of the 16 timers may be applied to any of the 32 relays.  So as long as a timer is available (not active), it can be applied to any relay.  If your application requires more than 16 timers to run simultaneously, then a second controller would be required.

Back To Top

Relay Timers (Set and Activate)

The following commands will set and activate a timer.

TX: T HR MN SC R CK FUNCTION: RX:
170 7 254 50 50 0 0 5 0 24 Relay 0 On for Duration of 5 Seconds using Timer 0 170 1 85 0
170 7 254 50 70 0 0 5 0 44 Pulse Relay 0 using Timer 0 after 5 Seconds 170 1 85 0
170 7 254 50 51 0 0 10 0 30 Relay 0 On for Duration of 10 Seconds using Timer 1 170 1 85 0
170 7 254 50 71 0 0 10 0 50 Pulse Relay 0 using Timer 1 after 10 Seconds 170 1 85 0
170 7 254 50 65 1 0 0 31 66 Relay 31 On for Duration of 1 Hour using Timer 15 170 1 85 0
170 7 254 50 85 1 0 0 23 78 Pulse Relay 23 using Timer 15 after 1 Hour 170 1 85 0
170 7 254 50 61 0 10 0 21 61 Relay 21 On for Duration of 10 Min. using Timer 11 170 1 85 0
170 7 254 50 84 0 20 0 22 95 Pulse Relay 22 using Timer 14 after 20 Minutes 170 1 85 0

Relay Timers offer even deeper functionality, as they may also be paused or resumed at any time.  Similarly, relay timers may be set, but not activated until a later time.  Reading the status and remaining time of timers is also possible using the timer command set.  The following example commands demonstrate various timer features:

Back To Top

Relay Timers (Set Only)

The following relay timer commands will configure the timer values only, but will NOT activate the timers.  Timer activation is handled by the “Relay Timers: Pause and Resume” section of this guide.

TX: T HR MN SC R CK FUNCTION: RX:
170 7 254 50 90 0 0 5 0 64 Relay 0 On for Duration of 5 Seconds using Timer 0 170 1 85 0
170 7 254 50 110 0 0 5 0 84 Pulse Relay 0 using Timer 0 after 5 Seconds 170 1 85 0
170 7 254 50 51 0 0 10 0 30 Relay 0 On for Duration of 10 Seconds using Timer 1 170 1 85 0
170 7 254 50 110 0 0 10 0 89 Pulse Relay 0 using Timer 1 after 10 Seconds 170 1 85 0
170 7 254 50 105 1 0 0 31 106 Relay 31 On for Duration of 1 Hour using Timer 15 170 1 85 0
170 7 254 50 125 1 0 0 23 118 Pulse Relay 23 using Timer 15 after 1 Hour 170 1 85 0
170 7 254 50 101 0 10 0 21 101 Relay 21 On for Duration of 10 Min. using Timer 11 170 1 85 0
170 7 254 50 124 0 20 0 22 135 Pulse Relay 22 using Timer 14 after 20 Minutes 170 1 85 0

Back To Top

Relay Timers: Pause and Resume

The commands below set the active status of all 16 timers.  Timers are either active or inactive, in other words, they are running (counting down), or they are paused (not counting down).  LSB and MSB are 16-bit binary values used to define the active state of each of the 16 timers.  When a specific timer is set active, all other timers are set as inactive.  When working with the above commands, make sure you always take into account that any bits not set will deactivate the associated timer, and may inadvertently deactivate any timers that may be running.  It’s also important to note the above commands will not cancel a timer, they will simply pause a timer.

TX: T LSB MSB CK FUNCTION: RX:
170 5 254 50 131 255 255 96 Activate All Timers 170 1 85 0
170 5 254 50 131 0 0 98 Deactivate All Timers 170 1 85 0
170 5 254 50 131 1 0 99 Activate Timer 1 Deactivate All Others 170 1 85 0
170 5 254 50 131 128 0 226 Activate Timer 8 Deactivate All Others 170 1 85 0
170 5 254 50 131 0 1 99 Activate Timer 9 Deactivate All Others 170 1 85 0
170 5 254 50 131 0 128 226 Activate Timer 16 Deactivate All Others 170 1 85 0

Back To Top

Relay Timer Query

The commands below demonstrate how to query a timer.  Using query commands, users may ask the controller the amount of time remaining for each timer.  Timers always count down in one second intervals, so each second, the received value will change for all active timers.  A timer query command will return 4 parameters: Remaining Hours (H), Minutes (M), Seconds (S), and the Relay (R) associated with the timer.

TX: T CK FUNCTION: RX: H M S R
170 4 254 50 130 0 96 Query Timer 0 170 4 0 0 0 0 174
170 4 254 50 130 1 97 Query Timer 1 170 4 0 0 0 0 174
170 4 254 50 130 15 111 Query Timer 15 170 4 0 0 0 0 174

Back To Top

Relay Timer Calibration and Accuracy

As mentioned earlier, relay timers are simulated in firmware, operating as a background process called by a timer interrupt.  ProXR controllers use an external system clock to maintain a 3% timing accuracy, not to be confused with a real time clock (RTC).  Since relay timers are derived from the system clock, it would stand to reason that relay timers maintain a 3% accuracy as well.  However, the CPU that powers ProXR controllers handles many interrupts on a priority basis, which can further deviate the accuracy to the timers.  ProXR relay timers are best suited for applications that do not require precise timing.  For instance, activating a porch light for 30 minutes, or closing a gate after 2 minutes, or ringing a school bell for 20 seconds.  These applications don’t really care if the timing is off by a few seconds.

Perhaps one of the most useful features of Relay Timers include the timer calibration function.  Timer calibration can be used to define the length of a second, as seen by the timer.  By lowering the timer calibration value, the timer can be accelerated.  Similarly, increasing the timer calibration value can greatly increase the length of a single second.  This feature is particularly useful if you need to control timing operations at a higher resolution.  Some customers have lowered these values to increase timing precision with great success.

Users may experiment with timer calibration in the “Timer Calibration” control panel.  This control panel allows you to experiment with activating 1, 8, or 16 timers simultaneously, testing short and long durations so you can see the actual effects of your settings over longer time periods.  Please note, since computers are interrupt driven, timing accuracy of the software is limited.

Be sure to write down your favorite calibration setting, as it will be necessary to use the “Device Configuration” control panel to store your timer values.

Back To Top

Relay Timer Samples Control Panel

The “Relay Timer Samples” control panel demonstrates a few use case scenarios for timers.  This control panel does not introduce any new commands, and is intended for demonstration purposes only.

Back To Top

Relay Power-up Memory

Relay Power-up and Status Map

ProXR controllers allow you to read the on/off status one bank of relays or 32 banks of relays at a time.  Reading the current status of relays will incate the on/off status of all relays at any given time while reading the power-up status will indicate the on/off status of relays when power is first applied to the controller.

TX: FUNCTION: RX:
170 3 254 124 1 40 Read the Current Status of Relay Bank 1 170 1 0 171
170 3 254 124 2 41 Read the Current Status of Relay Bank 2 170 1 0 171
170 3 254 143 1 59 Read the Power-Up Status of Relay Bank 1 170 1 0 171
170 3 254 143 2 60 Read the Power-Up Status of Relay Bank 2 170 1 0 171
170 3 254 124 0 39 Read the Current Status of Relay Banks 1-32 35 BYT
170 4 254 124 0 1 41 Read the Current Status of Relay Banks 33-64 35 BYT
170 3 254 143 0 58 Read the Power-Up Status of Relay Banks 1-32 35 BYT
170 4 254 143 0 1 60 Read the Power-Up Status of Relay Banks 33-64 35 BYT

The last 4 commands in the sample return 35 bytes, beginning with a 170 header byte, followed by a value of 32 indicating the number of data bytes to expect, followed by 32 relay status bytes beginning with Bank 1, and concluding with a checksum value, which is the 8-bit sum of all previous bytes.

Back To Top

Analog to Digital Converters

8-Channel Analog to Digital Converters

Select ProXR Series controllers are equipped with eight on-board analog to digital converters.  ADCs can be used to read many kinds of analog sensors as well as switches.  ADCs are available on all ProXR Lite series controllers as well as ProXR series that begin with ZAD in the part number.  This section of our tutorial will not apply to ProXR series with part numbers beginning with ZUXP.

ADCs are very sensitive to voltages, as their entire purpose is to convert a voltage from 0 to 5 volts into a value from 0 to 255 when using 8-Bit conversion mode (10-Bit mode converts voltages into values from 0 to 2047).  Analog inputs should never be left in a “floating” state.  In other words, they should be connected at all times to a voltage source or ground to keep the quiet.

Back To Top

Pull Up/Down Jumper

ProXR controllers use eight 10K resistors to “pull” the inputs high (+5V) or low (Ground).  The integrated resistor network will ensure all inputs are always connected to ground or 5V using the “Pull Up/Down” jumper (as labeled on the circuit board).  Installing the jumper in the “Up” position will pull the analog inputs to 5V through the 10K resistor.  Likewise, installing this jumper in the “Down” position will pull the inputs to ground.  The default jumper setting is in the “Up” position.  This will allow the analog inputs to directly connect to switches, which is very useful if you need to manually control a relay from an analog input (See “AD8 Relay Activator / Event Generator” later in this guide).

Back To Top

Analog to Digital Conversion (ADC) Commands (8-Bit)

The following commands demonstrate the 8-Bit AD8 command set.

TX: FUNCTION: ADC 8-BIT RX:
170 2 254 150 64 Read ADC Input 1 170 1 255 170
170 2 254 151 65 Read ADC Input 2 170 1 255 170
170 2 254 152 66 Read ADC Input 3 170 1 255 170
170 2 254 153 67 Read ADC Input 4 170 1 255 170
170 2 254 154 68 Read ADC Input 5 170 1 255 170
170 2 254 155 69 Read ADC Input 6 170 1 255 170
170 2 254 156 70 Read ADC Input 7 170 1 255 170
170 2 254 157 71 Read ADC Input 8 170 1 255 170

Read All 8 Analog Inputs with 8-Bit Result per Channel:

TX: FUNCTION: RX: C1 C2 C3 C4 C5 C6 C7 C8
170 2 254 166 80 Read All 8-Channels 170 8 255 255 255 255 255 255 255 255 170

Back To Top

Analog to Digital Conversion (ADC) Commands (10-Bit)

TX: FUNCTION: ADC 10-BIT RX: MSB LSB CKS
170 2 254 158 72 Read ADC Input 1 170 2 3 255 174
170 2 254 159 73 Read ADC Input 2 170 2 3 255 174
170 2 254 160 74 Read ADC Input 3 170 2 3 255 174
170 2 254 161 75 Read ADC Input 4 170 2 3 255 174
170 2 254 162 76 Read ADC Input 5 170 2 3 255 174
170 2 254 163 77 Read ADC Input 6 170 2 3 255 174
170 2 254 164 78 Read ADC Input 7 170 2 3 255 174
170 2 254 165 79 Read ADC Input 8 170 2 3 255 174

The following command will return 16 bytes of data.  Data is arranged in numeric order (C1-C8) from channel 1 to channel 8.  Each channel is represented as a 10-Bit value (MSB and LSB).  The Checksum is represented in the (CKS) column.

MSB LSB MSB LSB MSB LSB MSB LSB CKS
TX: FUNCTION: RX: C1 C1 C2 C2 C3 C3 C4 C4
170 2 254 167 80 Read All 8-Channels 170 16 3 255 3 255 3 255 3 255
C5 C5 C6 C6 C7 C7 C8 C8
3 255 3 255 3 255 3 255 202

Converting MSB and LSB into an Integer:
The tables above demonstrate how 10-Bit data is communicated using 8-Bit values.  To convert the 8-Bit values into a usable integer, follow this simple formula:
Analog Value = (MSB x 256)  + LSB
Analog Value = (3 x 256) + 255
Analog Value = 1023

Back To Top

Controlling Relays from Inputs

AD8 Relay Activator / Event Generator

ProXR Lite and ZAD Series controllers include a Relay Activator and Event Generator configuration option.  This control panel is used to mondify memory, allowing users to control relays based on analog inputs.  This allows manual control of relays, which may be helpful in certain applications.  The event generator is very easy to use, as each analog input can be configured to perform a specific function.  By default, analog inputs don’t do anything.  However, users have many options to control relays when inputs change state.  Relay control is limited to the first 8 relays only for most functions, so users of larger relay controllers should plan manual activation events on the first 8 relays (Relay Bank 1 as marked on the circuit board).
To use this control panel users should set the Pull Jumper in the “Up” position.  
Be sure to click “Save Settings” anytime you make a change to this control panel.

Function 0: Do Nothing
Function 0 does nothing, this is the default setting.

Function 1-8: Momentary Relay Control
This function allows momentary control of relays based on input status.  When configured, the relay will activate when the analog input is connected to ground.

Function 9-16: Toggle Relay Control
This function allows users to toggle relays based on inputs.  When configured, the relay state will toggle each time there is a connection between input and ground.  Connect to a button for a “Push On/Push Off” relay control operation.

Function 17-24: Turn On Relay
Activate a Relay when inputs are configured using these function values.  When configured, the relay will activate when the input is connection to ground.  The relay will not be turned off using this command, this is a ON ONLY command.

Function 25-32: Turn Off Relay
Deactivate a Relay when inputs are configured using these function values.  When configured, the relay will deactivate when the input is connection to ground.  The relay will not be turned on using this command, this is a OFF ONLY command.

Function 33-40: Momentary Relay Flash
Flash a Relay when inputs are configured using these function values.  When configured, the relay will flash on and off while the input is connection to ground, the relay will stop flashing when the input is disconnected from ground.

Function 41-48: Toggle Relay Flash
Toggle a Flashing Relay when inputs are configured using these function values.  When configured, the relay will begin flashing once the input connects to ground.  Disconnect the input from ground, then reconnect the input to ground to stop the flashing operation.  Put simply, connect a button between the input and ground.  Push the button, the relay will flash.  Push the button again, the relay will stop flashing.

Function 49: Turn Off Relay Banks 1-4
Turn off relay banks 1-4 (32 relays) when inputs are configured using these function values.  When configured, all 32 relays will turn off each time there is a connection between input and ground.  This is a OFF ONLY command.

Function 50: Turn On Relay Banks 1-4
Turn on relay banks 1-4 (32 relays) when inputs are configured using these function values.  When configured, all 32 relays will turn on each time there is a connection between input and ground.  This is a ON ONLY command.

Function 51: Banks 1-4 Follow the Input Status (almost)
This is a relatively unusual command, users should experiment with it to see what it does.  Think of it as a bonus command, perhaps it will be useful for someone.

Send API Event:
ProXR AD8 Series controllers have the ability to send simple push notification data when a change is detected on the inputs.  When the drop down menu is configured to “Send Event on Port 1”, the controller will generate a packet of data reflecting the state of all inputs.  Simply monitor the data sent from the controller while connecting one or more inputs to ground to see the push notification data.

Back To Top

XR Expansion Port

XR Relay Expansion Port

ProXR controllers (excluding ProXR Lite) include a XR Relay Expansion port.  This expansion port allows you to control more relays by adding expansion boards.  The XR port allows you to mix high-power and low-power relays together.  Easily add or mix signals relays, power relays, and solid state relays using the XR Expansion port.  ProXR controllers provide firmware support for control of 64 relay banks (512 relays).  However, it should be stated that due to EMI and cable distance limitations, it may not be possible to achieve a full 512 relay configuration.  As a general rule, the XR bus should extend no more than 3 feet from the main controller.  This length includes cabling AND the length of the relay expansion boards added together.  Anything beyond 3 feet should be considered experimental, and may prove unreliable for some applications.

Back To Top

UXP Expansion Port

UXP Expansion Port

Select ProXR series controllers that contain UXP in the part number include a UXP expansion port.  These controllers have different firmware that support compatible UXP expansion boards, allowing you to add Contact Closure Inputs, Potentiometer Outputs, and High-Resolution Analog to Digital Converters.  This section of our tutorial will demonstrate each of the expansion boards, and the commands associated with these expansions.  Please note that only one type of expansion is permitted on the UXP port.  For instance, if you choose Contact Closure inputs, then all expansions most be a contact closure input.  It is not possible to mix expansion types on the UXP port.  Also note that UXP controllers do not support any of the AD8 features mentioned above, including the AD8 activator features.

Back To Top

UXP Contact Closure Input Expansion

The UXP expansion port found on ProXR series controllers (equipped with a UXP port) support contact closure inputs.  These controllers allow you to connect buttons, switches, motion detectors, or any other type of contact closure input to your relay controller.  UXP series controllers are able to be read the contact closure inputs based on a polled protocol.  Polling is the process of asking the controller the current state of the contact closure inputs and receiving a reply.  Push notification is not supported for any UXP expansions.  Since inputs on this expansion will not accept voltages on the inputs, users should exercise caution when connecting external devices.

The following commands demonstrate how to read contact closure inputs from ProXR controllers equipped with UXP hardware and firmware.  A Bank (B) of 8 inputs is read for each request.  Each of 8 inputs is represented in standard byte format as part of the data returned (R) from the controller.  The MSB of the returned data (R) represents Input 8 while the LSB of the returned data (R) represents input 1.

TX: B FUNCTION: RX: R
170 3 254 175 0 90 Read Contact Closure Input Bank 1 170 1 0 171
170 3 254 175 1 91 Read Contact Closure Input Bank 2 170 1 0 171
170 3 254 175 2 92 Read Contact Closure Input Bank 3 170 1 0 171
170 3 254 175 3 93 Read Contact Closure Input Bank 4 170 1 0 171
170 3 254 175 4 94 Read Contact Closure Input Bank 5 170 1 0 171

Users may also request more than one bank at a time by specifying a start bank (S) and a count (C).  The start (S) bank is a value from 0 to 255 and the count (C) bank is a value of 0 to 31.  The Count (C) is added to the start bank, so the first example should be interpreted to mean: Read Contact Closure Inputs Starting (S) with Bank 0 and add a count (C) of 2 more banks for a total of 3 banks (24 total inputs).

TX: S C FUNCTION: READ CONTACT CLOSURE BANKS RX:
170 3 254 175 0 2 90 Start at Bank 0 and Read 2 More Banks 170 3 0 0 0 173
170 3 254 175 1 3 91 Start at Bank 1 and Read 3 More Banks 170 4 0 0 0 0 174
170 3 254 175 2 4 92 Start at Bank 2 and Read 4 More Banks 170 5 0 0 0 0 0 175
170 3 254 175 3 5 93 Start at Bank 3 and Read 5 More Banks 170 6 0 0 0 0 0 0 176
170 3 254 175 4 6 94 Start at Bank 4 and Read 6 More Banks 170 7 0 0 0 0 0 0 0 177

Back To Top

UXP Analog to Digital Conversion (8/12-Bit)

The UXP expansion port found on ProXR series controllers (equipped with a UXP port) support up to 48 Channels of Analog to Digital Conversion with 12-Bit resolution.  These controllers allow you to read analog voltages from 0 to 5VDC, ideal for sensor monitoring applications.  UXP series controllers are able to be read ADC inputs based on a polled protocol.  Polling is the process of asking the controller the current voltage on any of the inputs and receiving a reply.  Push notification is not supported for any UXP expansions.  Users should exercise caution not to exceed 5VDC on any of the analog inputs to prevent permanent damage.

The ADC Inputs are divided into (I) Inputs and Devices (See Function Column).  Each devices has 16 available inputs (I), which will return a standard 8-bit value based on the voltage present on the input at the time of reading.  Up to 3 devices are supported per UXP port for a total of 16 inputs per device, or 48 total available input channels.

The following commands demonstrate how to read individual analog inputs in 8-Bit mode from ProXR controllers equipped with UXP hardware and firmware:

TX: I FUNCTION: READ 8-BIT ADC DEVICE 0 RX: R
170 3 254 195 0 110 Read ADC Input Channel 0 8-Bit 170 1 255 170
170 3 254 195 15 125 Read ADC Input Channel 15 8-Bit 170 1 255 170
TX: I FUNCTION: READ 8-BIT ADC DEVICE 1 RX: R
170 3 254 203 0 118 Read ADC Input Channel 0 8-Bit 170 1 255 170
170 3 254 203 15 133 Read ADC Input Channel 15 8-Bit 170 1 255 170
TX: I FUNCTION: READ 8-BIT ADC DEVICE 2 RX: R
170 3 254 208 0 123 Read ADC Input Channel 0 8-Bit 170 1 255 170
170 3 254 208 15 138 Read ADC Input Channel 15 8-Bit 170 1 255 170

The following commands will read all 16 channels at 8-Bit resolution:

TX: FUNCTION: READ 16 CHANNELS 8-BIT RX:
170 2 254 192 106 Read ADC Device 0, 16 Channels 170 16 255 Channel 0
170 2 254 193 107 Read ADC Device 1, 16 Channels 170 16 255 Channel 1
170 2 254 194 108 Read ADC Device 2, 16 Channels 170 16 255 Channel 2
255 Channel 3
255 Channel 4
255 Channel 5
255 Channel 6
255 Channel 7
255 Channel 8
255 Channel 9
255 Channel 10
255 Channel 11
255 Channel 12
255 Channel 13
255 Channel 14
255 Channel 15
170 Checksum

The following samples read individual channels with 12-bit resolution.  These commands return 2 bytes, LSB and MSB.  The actual returned value can be computed using the following equation:
AD Value = (MSB x 256) + LSB

TX: I FUNCTION: READ 12-BIT ADC DEVICE 0 RX: LSB MSB
170 3 254 199 0 114 Read ADC Input Channel 0 8-Bit 170 2 255 15 186
170 3 254 199 15 129 Read ADC Input Channel 15 8-Bit 170 2 255 15 186
TX: I FUNCTION: READ 12-BIT ADC DEVICE 1 RX: LSB MSB
170 3 254 207 0 122 Read ADC Input Channel 0 8-Bit 170 2 255 15 186
170 3 254 207 15 137 Read ADC Input Channel 15 8-Bit 170 2 255 15 186
TX: I FUNCTION: READ 12-BIT ADC DEVICE 2 RX: LSB MSB
170 3 254 209 0 124 Read ADC Input Channel 0 8-Bit 170 2 255 15 186
170 3 254 209 15 139 Read ADC Input Channel 15 8-Bit 170 2 255 15 186

The following commands read 16 channels at 12-Bit resolution, returning a total of 32 bytes:

TX: FUNCTION: READ 16 CHANNELS 12-BIT RX: LSB MSB
170 2 254 196 110 Read ADC Device 0, 16 Channels 170 32 255 15 Channel 0
170 2 254 197 111 Read ADC Device 1, 16 Channels 170 32 255 15 Channel 1
170 2 254 198 112 Read ADC Device 2, 16 Channels 170 32 255 15 Channel 2
255 15 Channel 3
255 15 Channel 4
255 15 Channel 5
255 15 Channel 6
255 15 Channel 7
255 15 Channel 8
255 15 Channel 9
255 15 Channel 10
255 15 Channel 11
255 15 Channel 12
255 15 Channel 13
255 15 Channel 14
255 15 Channel 15
170 Checksum

Back To Top

UXP Digital Potentiometers (8-Bit)

The UXP expansion port found on ProXR series controllers (equipped with a UXP port) support the ability to control digital potentiometers.  Use the digital pot expansion boards for tuning of external analog circuits, audio control applications, or scientific control and simulation applications.  Digital potentiometers offer 8-bit resolution with the ability to control many channels individually or simultaneously.  Digital potentiometer outputs are available in 10K, 50K, and 100K ohm resistance.  Digital potentiometers are limited to working with analog circuits in the 0 to 5V range, and are current limited to 1ma per channel.  Exceeding the voltage or current on any of the potentiometers may result in permanent damage.

The following commands demonstrate how to control digital potentiometers from ProXR controllers equipped with UXP hardware and firmware using the Channel (C) and Value (V) parameters.  The channel value is used to identify which potentiometer you would like to control.  The value parameter controls the wiper of the potentiometer.  A value of 0 set the wiper all the way to the left.  A value of 128 moves the wiper to the center position.  A value of 255 move the wiper all the way to the right.  Note, as with most potentiometers, there are 3 contact points per potentiometer.

TX: C V FUNCTION: RX:
170 4 254 170 0 64 150 Set Potentiometer Output 0 to 64 (25%) 170 1 85 0
170 4 254 170 0 128 214 Set Potentiometer Output 0 to 128 (50%) 170 1 85 0
170 4 254 170 0 255 85 Set Potentiometer Output 0 to 255 (100%) 170 1 85 0
170 4 254 170 1 64 151 Set Potentiometer Output 1 to 64 (25%) 170 1 85 0
170 4 254 170 2 128 216 Set Potentiometer Output 2 to 128 (50%) 170 1 85 0
170 4 254 170 3 255 88 Set Potentiometer Output 3 to 255 (100%) 170 1 85 0

Users may want to set all potentiometer outputs simultaneously:

TX: V FUNCTION: RX:
170 3 254 171 64 150 Set All Potentiometer Outputs to 64 (25%) 170 1 85 0
170 3 254 171 128 214 Set All Potentiometer Outputs to 128 (50%) 170 1 85 0
170 3 254 171 255 85 Set All Potentiometer Outputs to 255 (100%) 170 1 85 0

Back To Top

Configuration and Run Modes

Program/Run Jumper: Configuration and Run Modes

ProXR Controllers have two modes of operation: Configuration and Run
Run Mode is for daily use.  Your controller should remain in Run Mode most of the time, as this will prevent writing to the internal EEPROM memory, which could accidentally change important settings that could result in a complete loss of communications.
Configuration Mode unlocks important sections of memory, allowing settings to be altered.
There are two ways to change modes on ProXR series controllers: Software and Hardware
Changing modes in hardware is very easy, simply move the PGM/RUN jumper to the desired setting.
Changing modes in software requires you to send a few commands, along with a duration (D) of time (in seconds), indicating how long you would like the controller to remain in configuration mode.  You may set the duration (D) to 0 if you would like to cancel the timer and return to Run mode.

TX: D FUNCTION: RX:
170 5 254 33 140 86 60 236 Configuration Mode for 60 Seconds 170 1 86 1
170 5 254 33 140 86 255 175 Configuration Mode for 255 Seconds 170 1 86 1
170 5 254 33 140 86 0 176 Cancel Configuration Mode 170 1 85 0

Hint: Should you ever loose communication with your controller, remove power, move the Jumper to Program Mode, power up the controller again.  Your ProXR controller will return to safe settings so you may recover your settings using our Base Station software.  

Back To Top

 

©2019 National Control Devices, LLC

ncd.io

Made in the USA
5 Year Warranty
Free Shipping on orders over $100
Free Shipping on orders over $100

To learn something new, take the path that you took yesterday. ~John Burroughs

*

Log in with your credentials

or    

Forgot your details?

Create Account