ADR Command Summary

The ADR interfaces operate using simple ASCII commands which can be sent using virtually any programming language without the use of special drivers.    The following are the commands available for each ADR product along with a few examples at the bottom of this page.


 ADR101

ANALOG COMMANDS

  • RDn             Read analog port in decimal format ( n = 0 or 1 )
  • RAn             Read analog port in % full scale format ( n= 0 or 1 )

DIGITAL COMMAND SUMMARY

  • CPAxxxxxxxx        Configures data direction of PORT A ( x = 0 or 1 )
  • SPAxxxxxxxx        Outputs binary data to PORT A ( x = 0 or 1 )
  • RPA                       Returns status of all I/O lines in PORT A in binary format
  • RPAn                     Returns status of I/O line specified by n ( n = 0 to 7 )
  • MAddd                  Outputs decimal data ( ddd) to PORT A ( ddd = 0 to 255 )
  • PA                         Returns status of PORT A in decimal format
  • RESPAn               Resets I/O line specified by n in PORT A ( n = 0 to 7 )
  • SETPAn               Sets I/O line specified by n in PORT A ( n = 0 to 7 )

ADR112

ANALOG COMMANDS

  • RDn             Read analog port in decimal format ( n = 0 or 1 )

DIGITAL COMMAND SUMMARY

  • CPAxxxxxxxx        Configures data direction of PORT A ( x = 0 or 1 )
  • SPAxxxxxxxx        Outputs binary data to PORT A ( x = 0 or 1 )
  • RPA                       Returns status of all I/O lines in PORT A in binary format
  • RPAn                     Returns status of I/O line specified by n ( n = 0 to 7 )
  • MAddd                  Outputs decimal data ( ddd) to PORT A ( ddd = 0 to 255 )
  • PA                         Returns status of PORT A in decimal format
  • RESPAn               Resets I/O line specified by n in PORT A ( n = 0 to 7 )
  • SETPAn               Sets I/O line specified by n in PORT A ( n = 0 to 7 )

ANALOG  INPUT COMMANDS

  • RD             Returns status of all 8 analog inputs  in decimal format (0-5VDC Ref )
  • RB             Returns status of all 8 analog inputs in decimal format ( +/- 5VDC Ref )
  • RDn          Returns status of analog port specified by n in decimal format ( SE  0 - 5VDC Ref ) ( n = 0 to 7 )
  • RBn          Returns status of analog port specified by n in decimal format ( SE  +/- 5VDC Ref ) ( n = 0 to 7 )
  • RAn          Returns status of analog port specified by n in decimal format ( DIFF  0 - 5VDC Ref ) ( n = 0 to 7 )
  • RCn          Returns status of analog port specified by n in decimal format ( DIFF  +/- 5VDC Ref ) ( n = 0 to 7 )

ANALOG  OUTPUT COMMANDS

  • VAdddd          Outputs decimal data ( dddd ) as analog voltage on terminal V1 ( VER A only )
  • VAdddd          Outputs decimal data ( dddd ) as analog voltage on terminal V2 ( VER A only )
  • FH                     Sets PWM frequency to 9.76Khz  ( VER B only )
  • FM                    Sets PWM frequency to 2.44Khz  ( VER B only )
  • FL                     Sets PWM frequency to 610Hz ( VER B only )
  • EA                     Enables 10-bit PWM on Terminal V1 ( VER B only )
  • EB                     Enables 10-bit PWM on Terminal V2 ( VER B only )
  • DA                     Disables 10-bit PWM on Terminal V1 ( VER B only )
  • DA                     Disables 10-bit PWM on Terminal V2 ( VER B only )
  • TAdddd             Sets period of PWM module A ( dddd = 0000 to 1024 )( VER B only )
  • TBdddd             Sets period of PWM module B ( dddd = 0000 to 1024 )( VER B only )

DIGITAL COMMAND SUMMARY

  • CPAxxxxxxxx        Configures data direction of PORT A ( x = 0 or 1 )
  • SPAxxxxxxxx        Outputs binary data to PORT A ( x = 0 or 1 )
  • RPA                       Returns status of all I/O lines in PORT A in binary format
  • RPAn                     Returns status of I/O line specified by n ( n = 0 to 7 )
  • MAddd                  Outputs decimal data ( ddd) to PORT A ( ddd = 0 to 255 )
  • PA                         Returns status of PORT A in decimal format
  • RESPAn               Resets I/O line specified by n in PORT A ( n = 0 to 7 )
  • SETPAn               Sets I/O line specified by n in PORT A ( n = 0 to 7 )

EVENT COUNTER COMMAND SUMMARY

  • CE                     Clears event counter
  • RE                     Returns present count of event counter
  • REC                  Returns present count and clears event counter

ID COMMAND

  • *IDN?       Returns 4 digit product ID code ( 2000 for VER A, 2001 for VER B )

ADR2010         

ANALOG  INPUT COMMANDS

  • RD             Returns status of all 8 analog inputs  in decimal format (0-5VDC Ref )
  • RB             Returns status of all 8 analog inputs in decimal format ( +/- 5VDC Ref )
  • RT               Returns status of all 8 analog inputs  in decimal format (0-10VDC Ref )
  • RH             Returns status of all 8 analog inputs in decimal format ( +/- 10VDC Ref )
  • RDn          Returns status of analog port specified by n in decimal format ( SE  0 - 5VDC Ref ) ( n = 0 to 7 )
  • RBn          Returns status of analog port specified by n in decimal format ( SE  +/- 5VDC Ref ) ( n = 0 to 7 )
  • RTn          Returns status of analog port specified by n in decimal format ( SE  0 - 10VDC Ref ) ( n = 0 to 7 )
  • RHn          Returns status of analog port specified by n in decimal format ( SE  +/- 10VDC Ref ) ( n = 0 to 7 )

ANALOG  OUTPUT COMMANDS

  • FH                     Sets PWM frequency to 9.76Khz 
  • FM                    Sets PWM frequency to 2.44Khz 
  • FL                     Sets PWM frequency to 610Hz
  • EA                     Enables 10-bit PWM on Terminal V1
  • EB                     Enables 10-bit PWM on Terminal V2
  • DA                     Disables 10-bit PWM on Terminal V1
  • DA                     Disables 10-bit PWM on Terminal V2
  • TAdddd             Sets period of PWM module A ( dddd = 0000 to 1024 )
  • TBdddd             Sets period of PWM module B ( dddd = 0000 to 1024 )

DIGITAL COMMAND SUMMARY

  • CPAxxxxxxxx        Configures data direction of PORT A ( x = 0 or 1 )
  • SPAxxxxxxxx        Outputs binary data to PORT A ( x = 0 or 1 )
  • RPA                       Returns status of all I/O lines in PORT A in binary format
  • RPAn                     Returns status of I/O line specified by n ( n = 0 to 7 )
  • MAddd                  Outputs decimal data ( ddd) to PORT A ( ddd = 0 to 255 )
  • PA                         Returns status of PORT A in decimal format
  • RESPAn               Resets I/O line specified by n in PORT A ( n = 0 to 7 )
  • SETPAn               Sets I/O line specified by n in PORT A ( n = 0 to 7 )

EVENT COUNTER COMMAND SUMMARY

  • CE                     Clears event counter
  • RE                     Returns present count of event counter
  • REC                  Returns present count and clears event counter

ID COMMAND

  • *IDN?       Returns 4 digit product ID code ( 2010 )

ANALOG  INPUT COMMANDS

  • RDn            Returns status f analog port specified by n  in decimal format (0-5VDC Ref ) ( n = 0 to 3 )

DIGITAL COMMAND SUMMARY   ( y = A,B,C or D )

  • CPyxxxxxxxx        Configures data direction of PORT y ( x = 0 or 1 )
  • SPyxxxxxxxx        Outputs binary data to PORT y ( x = 0 or 1 )
  • RPy                       Returns status of all I/O lines in PORT y in binary format
  • RPyn                     Returns status of I/O line specified by n ( n = 0 to 7 )
  • Myddd                  Outputs decimal data ( ddd) to PORT y ( ddd = 0 to 255 )
  • Py                         Returns status of PORT y in decimal format
  • RESPyn               Resets I/O line specified by n in PORT y ( n = 0 to 7 )
  • SETPyn               Sets I/O line specified by n in PORT y ( n = 0 to 7 )

PWM  COMMAND SUMMARY 

  • TAdddd             Sets period of PWM module A ( dddd = 0000 to 1024 )
  • TBdddd             Sets period of PWM module B ( dddd = 0000 to 1024 )

EVENT COUNTER COMMAND SUMMARY

  • CEx                Clears event counter ( x = A or B )
  • REx                Returns present count of event counter ( x = A or B 0
  • RCx                Returns present count and clears event counter ( x = A or B )

INTERRUPT COMMAND SUMMARY

  • IE                     Enable Interrupts
  • ID                     Disable Interrupts
  • IS                     Returns status of interrupts ( 0 if disabled, 1 if enabled )

STEPPER INDEXER  COMMAND SUMMARY  ( m = A for motor A, B for motor B )

  • CPASTEP     Configures PORT A to stepper indexer mode
  • MSddd            Sets step speed to 10 to 1000Hz  ( ddd = 1 to 100 )
  • LmFddddd    Loads motor move register and sets direction for forward ( CW )
  • LmRddddd    Loads motor move register and sets direction for reverse ( CCW )
  • Qm                 Returns present count of  motor m move register
  • E                     Emergency Stop, stops all motor movement
  • G                     Go, executes present move

ID COMMAND

  • *IDN?       Returns 4 digit product ID code ( 2100 )

ADR2200

RELAY OUTPUT COMMAND SUMMARY ( Relays organized as 8-bit PORT K )

  • SKn                   Sets ( closes contact ) relay specified by n  ( n = 0 to 7 )
  • RKn                   Resets ( opens contact ) relay specified by n  ( n = 0 to 7 )
  • SPKxxxxxxxx   Outpts binary data to PORT K  ( x = 0 or 1 )
  • MKddd             Outputs decimal data ( ddd ) to PORT K
  • NOTE: The following three commands allow reading of relay status and are used if verification
  • of commands is required.
  • RPK                  Returns status of all relays in PORT K in binary format
  • RPKn                Returns status of relay specified by n in binary format  ( n = 0 to 7 )
  • PK                     Returns status of relay PORT K in decimal format

DIGITAL INPUT COMMAND SUMMARY

  • RPA                 Returns status of all I/O lines in PORT A in binary format
  • RPAn               Returns status of I/O line specified by n  ( n = 0 to 3 )
  • PA                    Returns status of  PORT A in decimal format 

EVENT COUNTER COMMAND SUMMARY

  • CE                     Clears event counter
  • RE                     Returns present count of event counter
  • REC                  Returns present count and clears event counter

INTERRUPT COMMAND SUMMARY

  • IE                    Enable Interrupts
  • ID                    Disable Interrupts
  • IS                    Returns status of interrupts ( 0 if disabled, 1 if enabled )
  • TLnnnnn        Loads event counter trigger ( nnnnn = 0 to 65535 )
  • TS                  Returns event counter trigger value

ID COMMAND

  • *IDN?       Returns 4 digit product ID code ( 2200 )

 


ADR7700

ANALOG COMMANDS

  • RV                Read analog port in decimal format (00000-65535)
  • CAL            Calibrates analog to digital converter
  • BV1              Broadcasts value of analog input every 1000ms
  • BV2              Broadcasts value of analog input every 100ms

DIGITAL COMMAND SUMMARY

  • CPAxxxx               Configures data direction of PORT A ( x = 0 or 1 )
  • SPAxxxx                Outputs binary data to PORT A ( x = 0 or 1 )
  • RPA                       Returns status of all I/O lines in PORT A in binary format
  • RPAn                     Returns status of I/O line specified by n ( n = 0 to 3 )
  • MAdd                     Outputs decimal data ( ddd) to PORT A ( dd = 0 to 15 )
  • PA                         Returns status of PORT A in decimal format
  • RESPAn               Resets I/O line specified by n in PORT A ( n = 0 to 3 )
  • SETPAn               Sets I/O line specified by n in PORT A ( n = 0 to 3 )

INTERRUPT COMMAND SUMMARY

  • IE                    Enable Interrupts
  • ID                    Disable Interrupts
  • IS                    Returns status of interrupts ( 0 if disabled, 1 if enabled )

s.jpg (3330 bytes)AVR8000

CHANNEL SELECT COMMANDS ( C = 0 - 9 )

  • MVc          Selects video channel. ( c = 0 to 9 )
  • PV              Returns current video channel.
  • DTddd      Sets dwell time in seconds. ( ddd = 000 to 255 )
  • DR            Returns current dwell time.

MODE SELECT COMMANDS

  • M1              Configures AVR8000 for MODE 1 operation. ( default  )
  • M2              Configures AVR8000 for MODE 2 operation.
  • M3              Configures AVR8000 for MODE 3 operation.
  • MR              Returns current mode.

CONTACT INPUT ( PORT A ) COMMANDS

  • PA               Returns current value of PORT A in decimal format.
  • RPA            Returns current value of PORT A in binary format.
  • RPAn          Returns current value of input line specified by n. ( n = 0 to 7 )

INTERRUPT COMMAND SUMMARY

  • IE                     Enable Interrupts
  • ID                     Disable Interrupts
  • IS                     Returns status of interrupts ( 0 if disabled, 1 if enabled )
  • SMKxxxxxxxx  Loads interrupt mask data.
  • MKR                 Returns mask data..

ID COMMAND

  • *IDN?       Returns 4 digit product ID code ( 8000 )

A Few Examples,

Analog input commands  return a fixed number of characters    ( except the RAn command on the ADR101 ) depending on the resolution of the analog input of the particular ADR interface. For example,

RD0 on an ADR101  (8-bit analog) returns 000 to 255

RD0 on an ADR2100 ( 10-bit analog ) returns 0000 to 1023

RD0 on an ADR2000 ( 12-bit analog ) returns 0000 to 4095

Ex 1,                     RD3<cr>            (sent to ADR2000)

                           3456                     (data   indicates input is at ( 3456/4095 ) * 5 = 4.220 VDC )

Ex 2,                     RD2<cr>            (sent to ADR2100)

                           546                     (data returned indicates input is at ( 546/1024 ) * 5 = 2.666 VDC )

Digital port commands allow the user to;

  • Configure individual bits as input or output
  • SET or RESET individual bits
  • Read individual bits
  • Read entire port in BINARY or DECIMAL format
  • Write to port in BINARY or DECIMAL format

 

Ex 3,                     CPA00001111<cr>             (sent to ADR2000)

                             ( configures PA7,PA6,PA5,PA4 as output, PA3,PA2,PA1,PA0 as input )

Ex 4,                     SETPA3<cr>                        (sent to ADR2100)

                           ( sets bit 3 of PORT A )

Ex 5,                     PA<cr>                                   (sent to ADR2000)

                           128                     ( data returned indicates PA7 is high, all other lines are low )

Ex 6,                     MB255<cr>            (sent to ADR2100)

                           ( sets all lines high in PORT B  )

Commands for special  functions ( event counters, interrupts,PWM  etc. ) operate similarly. Browse the Applications section of this web site for examples.


 Back to Programming Page