XG555 CAN to DeviceNet Gateway
4
April 21, 2005
DeviceNet
A second CANbus interface provides a DeviceNet interface to the transducer position
information. An EDS file is provided with the unit. The DeviceNet interface defaults to 500 kbps, node 63.
This setup can be changed using RSNetworx for DeviceNet or another DeviceNet configuration tool.
To configure the gateway within RSNetworx, first use the EDS Wizard to add the .EDS file
supplied with the gateway. The gateway should be detected correctly during the next scan of the network.
After the gateway has been detected, add the gateway to the scan list of your PLC’s DeviceNet scanner.
Download the new configuration to the scanner. When you go on-line, the scanner should be exchanging
data with the transducer gateway.
The slave provides a polled connection that consumes 1 byte and produces 63 bytes. The
consumed byte is a command byte similar to the command byte used in the parallel connection. The bits of
the command byte are as follows:
Bits 0-3
Magnet number (0-15) (LSB is bit 0)
Bits 4-5
Transducer number (0-3) (LSB is bit 4)
Bit
6
Set
Zero
Bit
7
Unused
The data produced by the slave contains position and status data for one transducer, and returns
the command byte for feedback purposes. The production data is as follows:
Bytes 0-59
Position data for the requested transducer (0-14). The position data is
returned as twos-compliment 32-bit signed integers.
Bytes 60-61
Status data for the magnets on the requested transducer. Each bit of the
status data corresponds to a magnet. For example bit 0 of byte 60
indicates the status of magnet 0 on transducer 0.
Byte 62
The consumed command byte.
The position data returned will contain position data for magnets on the following transducer if
the requested transducer has less than 15 magnets, followed by the next transducer if space is still
available, and so on. At most, 15 positions will be returned.
Examples:
If your setup used 3 transducers with 6 magnets each and requested magnet 0; transducer 0 positions would be
stored between bytes 0 and 23, transducer 1 positions would be stored between bytes 24 and 47, and transducer 1 positions
for magnets 0 through 2 would be stored between bytes 48 and 59.
If you were to request transducer 1; transducer 1 positions would be stored between bytes 0 and 23, transducer 2
positions would be stored between bytes 24 and 47, and zeros would between bytes 48 and 59 because only three
transducer are used in the setup.
When bit 6 is not set, position and status data for the transducer requested in the command word
are returned. In this case, the magnet number is ignored.
If bit 6 is set, the transducer specified in the command word is offset to the position of the magnet
specified. If magnet 15 is specified, the offset of the transducer specified is set to zero. The command byte
must change before the transducer will be zeroed again.
The command byte mirrored in Byte 62 can be used to determine when the data has been updated.
The following sequence can be used:
1. Ouput new command byte
2. Wait for byte 62 to equal the sent command byte
3. Read
data
4. Return to step 1