B&B Electronics RS-232 Digital Relay I/O 232DRIO User Manual

Manual is about: B&B Electronics RS-232 Digital Relay I/O User Manual

Summary of RS-232 Digital Relay I/O 232DRIO

  • Page 1

    232drio-0308 manual cover page b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 rs-232 digital relay i/o model 232drio documentation number 232drio1005 pn#4520-r2 this product designed and manufactured in ottawa, illinois usa of domestic and imported parts b...

  • Page 3: Table of Contents

    232drio-0308 manual table of contents i b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 table of contents chapter 1- introduction ........................................... 3 232drio features .................................................. 3 packing lis...

  • Page 4

    Ii table of contents 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 demonstration program ........................................ 22 hard drive installation ......................................................... 22 running demonstra...

  • Page 5

    232drio-0308 manual 3 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 chapter 1- introduction 232drio features the 232drio is a general purpose data acquistion controller that is connected to your computer’s rs-232 serial port. The 232drio offers 1 opto-iso...

  • Page 6

    4 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 figure 1.1 – 232drio module figure 1.2 – simplified block diagram packing list examine the shipping carton and contents for physical damage. The following items should be in the shipping ...

  • Page 7

    232drio-0308 manual 5 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 number of channels: 1 indication mode logic “0”: led on, digital voltage input high logic “1”: led off, digital voltage input low input electrical characteristic voltage input low: vac/vd...

  • Page 8

    6 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 chapter 2 - connections do not make any connections to the 232drio until you have read this chapter. Remember to power down the unit and any other connected devices before making any kind...

  • Page 9

    232drio-0308 manual 7 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 table 2.1 - 232drio terminal blocks blue pin # function black pin # function 1 - ground input power 1 opto-isolated input 2 +12vdc input power 2 opto-isolated input 3 #2 n/c-normally clos...

  • Page 10

    8 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 table 2.3 – 232drio to dte connections 232drio pin # signal dte db-25 connection dte db-9 connection 2 receive data (rd) 3 2 3 transmit data (td) 2 3 5 signal ground (sg) 7 5 9 ring indic...

  • Page 11

    232drio-0308 manual 9 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 there are only two basic commands required to control the 232drio: set output lines and read i/o lines. For normal environments, command strings are from three to four bytes in length; th...

  • Page 12

    10 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 table 3.1 – 232drio commands function command response set output lines !0s{…} no response read i/o lines !0r {…} set output lines #0s{…}{~…} no response read i/o lines #0r {…}{~…} symbo...

  • Page 13

    232drio-0308 manual 11 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 used to specify which command will be executed by the controller,either the “r” or “s” character. The set output command requires one argument field (for normal environments) or two argu...

  • Page 14

    12 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 example 3.1 set output lines data byte relays binary decimal hex relay #2 relay #1 xxxxxx00 0 0 de-energized de-energized xxxxxx01 1 1 de-energized energized xxxxxx10 2 2 energized de-en...

  • Page 15

    232drio-0308 manual 13 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 read i/o lines command the read i/o lines command returns one data byte (with the “!”) and two data bytes (data and its complement with the “#”) that reflects the state of the i/o lines....

  • Page 16

    14 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 command: !0s argument: {…} (shown in bold face) response: none ascii example: !0s dec. Example: !0s hex. Example: !0s bin. Example: !0s description: relay #2 is energized (“1”), and rela...

  • Page 17

    232drio-0308 manual 15 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 this chapter will explain "high" and "low" states and show some general examples of how to interface to the i/o lines. Caution must be taken not to exceed 232drio specifications listed i...

  • Page 18

    16 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 figures 4.2 - 4.4 show examples of some typical input interfaces. Figure 4.2 - switch input figure 4.3 - solid state input 232drio external circuit 5-30 vdc/vac opto isolated input 232dr...

  • Page 19

    232drio-0308 manual 17 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 figure 4.4 - isolated mechanical input relay outputs relay outputs are used to turn external devices on or off. Relay outputs are cmos/ttl compatible and can also operate between 0- 24vd...

  • Page 20

    18 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 figures 4.5 - 4.6 show examples of some typical output interfaces. Figure 4.5 – isolated connection to external circuit figure 4.6 – isolated connection to external devices external circ...

  • Page 21

    232drio-0308 manual 19 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 chapter 5 - software this chapter will be divided into two sections. The first section covers programming techniques for opening/closing a com port, receiving data, and manipulating data...

  • Page 22

    20 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 quickbasic (demo232.Exe and demo232.Bas) this section shows steps and examples of programming the 232drio in quickbasic. If you are programming in another language, this section can be h...

  • Page 23

    232drio-0308 manual 21 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 c/c++ (demo232.Exe and demo232.Cpp) demo232.Cpp is a demonstration program for use with b&b electronics model 232drio module. Much of the work associated with using com ports in c/c++ ha...

  • Page 24

    22 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 demonstration program the demonstration programs (ibm pc or compatible) provide the user with examples of how to receive and transmit commands to the 232drio. The demo232.Exe is the exec...

  • Page 25: Appendix A

    232drio-0308 manual appendix a a-1 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 appendix a ascii character codes.

  • Page 26

    A-2 appendix a 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 decimal to hex to ascii conversion table dec hex ascii key dec hex ascii dec hex ascii dec hex ascii 0 0 nul ctrl @ 32 20 sp 64 40 @ 96 60 ` 1 1 soh ctrl a 33 21 ! 65 41 a 97...

  • Page 27: Appendix B

    232drio-0308 manual appendix b b-1 b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 the decimal (base 10) numbering system represents each position in successive powers of 10, with each decimal symbol having a value from 0 to 9. The hexadecimal (base 16) num...

  • Page 28

    B-2 appendix b 232drio-0308 manual b&b electronics -- po box 1040 -- ottawa, il 61350 ph (815) 433-5100 -- fax (815) 433-5104 hexadecimal to decimal conversion: decimal = (1st hex digit x 4096) + (2nd hex digit x 256) + (3rd hex digit x 16) + (4th hex digit) each "hex digit" is the decimal equivalen...