TDT BH32 Manual Download Page 11

System 3

17-27

BH32 Behavioral Cage Controller

An incoming UDP packet is de-serialized and sent to the macro outputs. The 

“NewPack” output goes high (1) for one sample when a new packet header has 

been received. The “Busy” outputs are high (1) while the macro is de-serializing a 

packet. The length of this period depends on number of BH32 devices (it takes 

NumberOf1 sample to receive a packet). The macro outputs are latched 

until the next packet is received. The “Reset” input can be used to halt any data 

transfer and force the macro to wait for a new packet header.

Note:

Since the channels are received serially, data in later channels occurred several 

samples before it is available on the macro Output.

The

 

Packet

 

Structure

This guide assumes the BH32 is communicating over UDP using the Ethernet port. 

BH32 devices listen on UDP port 22022 and all other UDP messages are 

disregarded. Communication over the RS232 serial port uses an identical packet 

structure and programming. 
All data sent or received by the BH32 is in the form of a packet. Every packet has 

a standard structure which includes a header, target device and message.
The header consists of a 32-bit value; the first 24 bits are the protocol ID specific 

to the BH32/RZ interface and the next 8 bits are the protocol version (v1 as of 

this writing). This header is used by the BH32 and the RZ to identify packets that 

they should read and process.
The target device is identified with the next 24 bits of the packet. It consists of a 

16-bit device number and an 8-bit group number in case you have more than 256 

BH32 devices. This lets you target a single BH32 out of many on the network, or 

send batch commands to all BH32s on the network.
The message consists of a single toggle bit that identifies if the packet is to or from 

the device, a 7-bit message number (see “Messages” below) and a reserved 32-

bit word for message parameters. Additional data can be appended to messages that 

require more than one parameter, such as the GET_SET_IO message that sets the 

output state or GET_SET_CONFIG that changes the device configuration.

The structure for the packet is shown below:

1. (24 bits) Unique protocol ID number – 0x55AB00.
2. (8 bits) Message protocol version number – this document covers protocol 

v. 1. 

3. (16 bits) Device unit number. 

a. Devices will only process messages:
b. Matching their unit number.
c. With a unit number of -1.

All devices numbered 0 are considered to be unnumbered.

4. (8 bits) Group – used in the GET_SET_IO message. Due to the maximum 

transmission unit constraints on most networks, each message can only 

contain ~256 data words. Offset provides a means of doing a bulk update 

in 256 device increments (e.g. update devices 256-511). This is typically 

set to 0.

5. (1 bit) Source – 1 means from device, 0 means device will process it.

1

2

3

4

5 6

7

8

Summary of Contents for BH32

Page 1: ...ameter Standard Molex Pin and Socket connectors on the top panel For pinouts see BH32 Technical Specifications on page 17 30 Power The BH32 logic board is powered by either a 6 9V 3A center negative a...

Page 2: ...and current state of all bits in each bank 3 NetBIOS name and IP address 4 IP address of paired RZ device if paired See RZ Configuration on page 17 22 Push and hold the Mode button for two seconds th...

Page 3: ...Controlling the Molex outputs with UDP Serial banks A B only Configure the bank as an output The Molex outputs are low when active The digital output logic is the inverse of the Molex output logic Mo...

Page 4: ...sses configuring the BH32 networking communication and hardware interfaces See RZ UDP Communications Interface on page 1 51 for more information on the basics of networking and the various protocols I...

Page 5: ...er such as Internet Explorer Chrome or Firefox Enter the device s IP address as the web address e g http 10 1 0 100 and press Enter or Enter the NetBIOS name as the web address e g TDT_BHC_32_1001 and...

Page 6: ...ogin information can be changed on the Network Configuration page To access a page that requires authentication 1 Click the navigation link for the page 2 When prompted enter the username and password...

Page 7: ...Device Number is used to identify the BH32 among a network of BH32s For single BH32 use this value should be set to 1 Direction Each Bank can be configured as either Input or Output Logic Level Each...

Page 8: ...and password can be changed on this page If the Enable DHCP check box is checked the IP Address Gateway Address Subnet Mask and DNS server address values are overridden and automatically configured b...

Page 9: ...which supports TCP IP To initialize the PC for a direct connection in Windows XP 1 Physically connect the BH32 Ethernet interface and the PC via an Ethernet crossover cable 2 Click Start Control Panel...

Page 10: ...lly sends a new packet if any of the Inputs change value The 32 bit integer represents the current state of all I O on the BH32 device The ordering is as follows Bit31 Bit0 A8 A1 B8 B1 C8 C1 D8 D1 Exa...

Page 11: ...his writing This header is used by the BH32 and the RZ to identify packets that they should read and process The target device is identified with the next 24 bits of the packet It consists of a 16 bit...

Page 12: ...M mode the BH32 display flashes a prompt for the user to press the input button to set the BH32 device number to the starting device number Message Device Group 0b0 0b0000001 0x00000000 Starting Devic...

Page 13: ...to 256 timestamps total for all pins can be stored in memory Message Device Group 0b0 0b0000110 Pin Number Active 0 or 1 32 bits Reply Device Group 0b1 0b0000110 Pin Number 64 bit timestamp s GET_SET...

Page 14: ...the BH32 will no longer be in RZ_CONTROLLER state and broaast a GET_SET_TRIGGER message on the network with Trigger Mask 0 Message Device Group 0b0 0b0001101 0x00000000 RZ IP Address optional Reply D...

Page 15: ...ion 1 C1 Bank C Bits 1 3 5 and 7 14 C2 Bank C Bits 2 4 6 and 8 2 C3 15 C4 3 C5 16 C6 4 C7 17 C8 5 GND Digital I O Ground 18 A1 Bank A Bits 1 3 5 and 7 6 A2 Bank A Bits 2 4 6 and 8 19 A3 7 A4 20 A5 8 A...

Page 16: ...s are shorted together do not connect a second external power source I O CONNECTORS V Positive Voltage S Signal G Ground Pin Name Description Pin Name Description 1 A1 Bank A Bits 1 3 5 and 7 14 D7 Ba...

Reviews: