Robot Electronics DSX42 dScript Expansion Module User Manual
- June 4, 2024
- Robot Electronics
Table of Contents
dSx42
Electronics DSX42 dScript Expansion Module
User Manual
Documentation history
V4.10
First version.
Introduction
dSx42 modules are extension I/O modules that are connected to the RS485 bus
(serial port 3). Up to 16 dex modules may be added, controlled by the host
script module as if they are local I/O. The outputs are mapped to 2 of the 32
relays – real or virtual and the inputs can be accessed in the range 100-164.
dSx42 modules are powered from the 12v output on the host RS485 connector and
wired using a separate pair in the cable. A 2-pair cable is therefore
required. The six modules use very little current (less than 7mA each) and 15
of them are easily powered at the far end of 100 meters of cheap cable. The
maximum distance is 300 meters (1000 ft).
All dSx42’s feature separate in and out communication terminals for easy
connection to further modules.
Use of the six modules requires connection to a script module running the
default supplied app, or a custom derivative of it. Using the app’s
configuration screen, the dSx42 modules may be located and mapped to virtual
relays on the host. An “identify” button allows the actual module being mapped
to flash its LEDs so you know which it is.
JScript modules that can be used with the dSx42:
dS2242/dS3484/dS378/dS2408/dS2824/dS2832
Note the dS1242 and TCP184 cannot be used with dSX42’s
dSx42 Modules
There are three dSx42 modules available.
Module | Relays | Analogue | Digital | High Volts | VFC Input | Thermocouple |
---|---|---|---|---|---|---|
dSx42L | 2 | 4 | 4 | – | – | – |
dSx42H | 2 | – | – | 4 | – | – |
dSX42K | 2 | – | 2 | – | 2 | 1 |
In all cases, the relays are 16A 220vac switching (resistive loads).
dSx42L
This module has 4 inputs which may be analog or digital. As analog
inputs, they accept a 0-5v input, converting this to a 0-1023 value. As
digital inputs, 0v will read as 0 and 5v will read as 1. The inputs are
protected and can accept 12v input as a digital 1.
The dSx42L input schematic is shown above.
dSx42H
The dSx42H has four optically isolated high voltage inputs for direct sensing
of 110-220vac mains. A blue LED indicates the presence of a mains input.
Above: input schematic for the dSx42H.
Terminal pin 5 is a common reference (typically neutral) for all four inputs
input will read a 0, and 110-220vac will read as 1.
dSX42K
The dSX42K has a type K thermocouple input for temperature measurement, along
with two Volt Free Contact (VFC) inputs.
The thermocouple input uses the MCP96L01 which includes cold junction
compensation.
Type K thermocouple schematic.
Digital Inputs
Volt Free Contact (VFC) input
schematic. These may be connected to any switch or relay contacts to detect
closure. Do not apply any external voltage to these pins. Shorting them with
external contacts is all that is required.
The input order on the dSX42K is Input1, Input2, Probe temperature, and Cold
junction temperature. For a module mapped to position 17 (Relays 17,18 and
inputs 132-135) the probe temperature would be input A134.
The MCP96L01 has a resolution of 1/16th of a degree C. Therefore temperature
values returned by the dSX42K are 16 times higher than the real value. Divide
by 16 to get the
the temperature in degrees C and Modulus 16 to get the remainder in 1/16ths.
A reading of 379 would be 23 degrees C and 11/16ths, or 23.7 decimal (to 3
places).
dSx42 RS485 Wiring
The RS485 cable should be a twin pair cable
with a shield (also called a drain wire). The above colors are shown for
clarity and may be different on your cable. For example, AlphaWire 5472C uses
Red/Black for one pair and White/Black for the other. Take care when wiring to
correctly identify the pairs.
The total length of the cable from the controller to the last dSx42 should not
exceed 300 meters. The auxiliary 0v and 12v connections are shown unconnected
here. They may be used to draw a small amount of power from the 12v supply of
no more than a few mA, it depends on the cable length/quality. Keep an eye on
the volt drop in the cable. You should have a minimum of 10v coming into the
module.
The auxiliary 12v may also be used to supply 12v to the modules if the volt
drop is too high or you wish to use a single pair cable.
dSx Configuration
Th dSx Config screen on the dScript module is used to configure all dSx42
modules connected to the RS485 bus. The dS378 screen is shown but is the same
for all controllers.
Configuration
dSx mode is enabled by checking the
Enable dSx box. This will configure serial port 3, the RS485 port, to 250k
baud as used by the dSx modules. If un-checked the port will be
configured to the Modbus settings on the TCP/IP page. After checking or
unchecking this box and waiting for the red update pending light to go out
(about 5 seconds), reset the board the change takes effect.
To automatically search for box modules on the RS485 bus click the Start
button. This will clear all previous devices and mappings and fill the list
with all devices found and offer a default mapping.
The UID buttons will have the UIDs found, listed in ascending order (not the
physical position on the bus). If you need to identify which module is
assigned to that UID, click the button, and all LEDs on the module will flash.
Only one module will be in identify mode at any time. If you click another
button, then that module LEDs will flash and the first module will stop. Click
the button again, or click an empty (0) button to stop the flashing and clear
identify mode.
Note that the normal operation of the six modules is inhibited in
identify mode.
Mapping the six modules.
Each dSx module has 2 outputs and 4 inputs. The 2 relays may be mapped onto
any of the 32 relays (real or virtual). Mapping a module to position 9 means
that relays 1 and 2 on the dSx module will be controlled by virtual relays 9
and 10 on the dS378. The mapping can be changed by selecting a new mapping
with the drop-down box.
dSx Mapping Table
Mapping| Relay 1| Relay 2| Input 2| Input 2| Input
3| Input 4
---|---|---|---|---|---|---
1| 1| 2| 100| 101| 102| 103
3| 3| 4| 104| 105| 106| 107
5| 5| 6| 108| 109| 110| 111
7| 7| 8| 112| 113| 114| 115
9| 9| 10| 116| 117| 118| 119
11| 11| 12| 120| 121| 122| 123
13| 13| 14| 124| 125| 126| 127
15| 15| 16| 128| 129| 130| 131
17| 17| 18| 132| 133| 134| 135
19| 19| 20| 136| 137| 138| 139
21| 21| 22| 140| 141| 142| 143
23| 23| 24| 144| 145| 146| 147
25| 25| 26| 148| 149| 150| 151
27| 27| 28| 152| 153| 154| 155
29| 29| 30| 156| 157| 158| 159
31| 31| 32| 160| 161| 162| 163
* Note that inputs 100 and 101 are not available, either as analog or
digital inputs. If you need to use all inputs on the dSx module, map it to
something other than 1.
This is because A100 and A101 are historically used for the onboard
temperature and DC voltage inputs.
dSx Example
As an example, let’s assume the following:
You need 2 dSx42L relay modules. You want relay 1 on one module to be
controlled by input 2 from the other module using its analog input.
The dSx analog inputs are 0-5v and use 10-bit conversion, which is a range of
0-1023.
You want the relay to turn on when the input goes below 511 (about 2.5v) and
off above that value.
First, connect your 2 dSx42L modules to the RS485 port and click “Start”. You
should see the two UIDs for your boards listed. Next change the mapping as required to 29 for the first module and
31 for the other, using the drop-down selection boxes. Note: the UIDs are presented in ascending order, not any
physical position on the RS485 bus, so you will likely need to confirm which
UID belongs to which module. Clicking the UID button makes that module
identify itself by flashing all its LEDs. Click again to stop.
If you find the module mapped to 29 that has the analog input wired to it,
swap them over by changing the mapping like this:
You should always design your system by mapping number, not UID. That way if
you ever need to change a module you just make sure it has the same mapping as
the original and you’re all good to go. As part of your system documentation,
record the mapping number against the module task so you can quickly restore
the system should you need to.
So now the relay we wish to control is mapped to virtual relay 29 and the
input that is going to control it is mapped to input 161, which is the 2
inputs on mapping 31. The input number was obtained from the table on a
previous page.
Now we can go to the Relays page and configure the relay. Select relay 29 from
the drop-down box.
If you want, you can give the relay a more
descriptive name. To use input 161 as an analog input we use A161. If we
wanted a digital input it would be D161. Enter the following into the
Pulse/Follow box: A161<511All other fields can remain empty.
Now the relay will turn on when the input
is less than 511.
Although A161<511 is simple to understand, it’s not actually the best way to
do it. Analog inputs by their nature can jitter around. This can cause the
relay to pulse on/off as the input jitters close to 511. A better way is to
include some hysteresis like this: (A161<509&!R29)|(A161<513&R29)
This means the relay will turn on when the input is below 509 (508 or less),
but will not turn off again until the input is above 512 (513 or more). The
greater the difference between the two numbers, the greater the hysteresis.
dSx42 Overview
If you click on the dSx42 Overview link,
you will be taken to the following page:
Note: Position 1 is not shown,
position 2-16 displayed
Only 15 of the possible 16 positions are shown. Position 1 will not normally
be used as it overlaps inputs and relays already on the module. Modules that
are in use have a red border. The relays buttons operate the same as on the
application page, click them to toggle the relay. The top left of the box
shows the input range for that module and the 4 actual input values are shown
below the relays. It is always the analog value that is shown. For digital
inputs, it is close to 0 or 1023. We threshold them on the main controller to
return a 0-1 digital signal. In the top right of the box is the modules UID,
the same as shown on the dSx Config page.
dSx42 dimensions
dSx42L is shown. dSx42H and dSX42K have identical sizes and mounting hole positions.
Notes
dSdSx42x42
User Manual v4.10
Copyright © 2022, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>