8. Using the RAD-IO2 with CAN-HUB/FIRE2/ION/IND-VCAN

The RAD-IO2 communicates via a UART/USB signal. This can be connected directly to the USB port on a FIRE2, ION or VCAN-Industrial. You can also convert the native UART/USB signal via the CAN-HUB to CAN messages. The Arbitration CAN ID’s for the messages can be assigned individually for each channel of the RAD-IO2 module or selected via group. You can use the free JAVA program to accomplish this, or write custom PYTHON code. Both are on GIT-HUB.

If you are using Vehicle Spy or another program, you can load in the DBC file (generated from the JAVASCRIPT program) with the associated channel. If you do not load in the DBC file, you must configure the receive channels. The example below is for Vehicle Spy; if you are using the CAN-HUB then select the appropriate “HSCAN” channel, if you are attaching to the Fire2, ION or Industrial VCAN, select the “NEOVI” channel.

For INPUT DEVICES such as Thermocouple and Analog Input

8.1 Create a Receive message from Messages Editor by clicking on “Receive”, and then IF you are using CAN-HUB and converting to CAN, select the appropriate HS-CAN channel that you have physically wired to, or connected the DB9 connector on the CAN-HUB output to, you will also need to supply 5-40VDC to the CAN-HUB either via your custom cable or via the cable sold by Intrepid. If you are connecting via USB cable directly to the FIRE2/ION/Plasma or Industrial Value CAN, select the NEOVI channel.

HSCAN EXAMPLE

_images/hscan.png

NEOVI EXAMPLE

_images/neoviexample.png

Notice that the only thing different when setting up VSPY between a CAN wired channel or a NEOVI channel that is connected via USB, is the Network Channel; the drop down box “on Network” selection.

8.2 Set up a Receive signal that is 32 Bits

_images/signal.png

8.3 Then press the “fx Edit”

8.4 Select “32 Bit Floating IEEE Float”, “Little End First …” you can also give it some Mins and Max values but this will not affect the output measurements, just future Graphical Panels if you use them. Your signals will now appear as decimal measurements.

RAD-IO2-AOUT - Analog Output

8.5 The Analog output module has 8 banks with 3 channels each.

8.6 If you are using the AOUT with the CAN-HUB you would select the appropriate HSCAN bus and not neoVI- if you are connected via USB directly to a FIRE2 or ION/Plasma and Industrial VCAN use NEO-VI.

8.7 To understand how the system works, if you wanted to generate 2.5 volts using hex you would need to send 7F,FF. Desired voltage divided by Full scale voltage multiplied by 16 bits. Therefore 2.5 / 5 * 65535 = , or 32767.5; truncating to 32767 is 7FFF hex. 1 Volt would be 1 / 5 * 65535 = 13,107 = 3333 hex

8.7.1 In the first byte, the LSB bits 1,2,3 are the enable selector for each AOUT, then the subsequent 2 bytes (16 bits) are for the actual analog output.

8.7.2 Keep in mind the Analog Output has three 0-5VDC 16 Bit DAC channels for each bank, for a total of 24 channels, and each bank is isolated from each other bank.

8.7.3 In this example the CH1,CH2 and CH3 are the selection mask. CH1_Out, CH2_Out, CH3_Out are the data bytes.

8.7.4 FOR EXAMPLE: If you wanted to send 2.5 VDC to Bank1 channel 1 you would need to transmit ARB-ID 0041 Byte1=01, Byte2=7F Byte3=FF.

_images/setup.png

8.8 Using the generated DBC file or your own Tx messages, if you wanted to use signals and generate 2.5 volts, 3.75 VDC and have VSPY generate a RAMP function simply use the Tx Panel

_images/transmit.png

8.9 If you wanted to use function blocks you would of course use the SET VALUE and Transmit command

_images/transmit1.png

Analog Output Example

This example assume ARB ID 41h-48h

  CH Select Channel 1 Channel 2 Channel 3  
ARB ID Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte3  
41 0 7F FF         No Channel selected, Error response
41 1 7F FF         Bank1, CH1, 2.5 VDC
41 1 FF FF         Bank1, CH1, 5 VDC
41 1 0 0         Bank1, CH1, 0 VDC
41 2 0 0 7F FF     Bank1, CH2, 2.5VDC
41 4 0 0 0 0 FF FF Bank1, CH2, 2.5VDC
42 1 7F FF         Bank1, CH2, 2.5VDC
45 3 33 33 7F FF     Bank5, CH1, 1VDC; CH2 2.5 VDC
48 7 33 33 7F FF FF FF Bank8, CH1, 1VDC; CH2 2.5 VDC, CH3 5VDC
48 7 0 0 0 0 0 0 Bank5, CH1, 1VDC

8.10 It is easy to generate more than 5VDC or generate negative polarity by wiring the signal and ground pins of the isolated banks together so that the individual voltages equal the sum

_images/vdc.PNG

RELAY MODULE

8.11 For the RELAY module, similar logic applies. Byte 1 contains the selector or mask, and Byte 2 the data. For the example sending a HI (“1”) in data bit 1 on data byte 1 enables the Mask for relay 1, AND if in the same message you send HI (“1”) in databit 1 on databyte 2, you will turn the Relay1 “ON”. Assuming ArbID h0031 for the Relay module, sending a Transmit h0031, 01, 01, will turn relay 1 ON. Transmitting a h0031, 01, 00 will turn it OFF. Transmitting a h0031, 00, 00 will have no effect and will actually create a response back from the Relay module.

Relay Output Example

Relay Output Example

Assume ARBID 0031h

  Byte1 Byte2    
Transmit 31h 0 0   You will receive a message back from the module, nothing will turn ON
Transmit 31h 1 1   Relay 1 will turn “ON”
Transmit 31h 1 0   Relay 1 will turn “OFF”
Transmit 31h 80 80   Relay 8 will turn “ON”
Transmit 31h 80 0   Relay 8 will turn “OFF
Transmit 31h 1A 1A   Relay 2,4,5 will turn on
Transmit 31h 1A 0A   Relay 5 will turn OFF and relays 2,4 ON
Transmit 31h 1 FF   Relay 1 will turn ON, there will be no effect on the other relays

8.12 FOR EXAMPLE: we created 16 signals to illustrate the control over the relays.

One way to make function blocks to be more readable for yourself and future users is to create Transmit Messages for each Relay. You could also create application signals for each value.

_images/relay1.png

This function block example turns OFF Relay 1 and Relay 4 if the voltage on the AIN module measured is greater than or equal to 2 volts and ELSE turns Relay 1 and Relay 4 ON if the voltage is less than 2 volts. We then delay for 200 mS. It is good to delay for some time after changing the relays state or they may chatter if a noisy input signal is used as the action item.

_images/relay2.png