Rabbit OP7100 User Manual Page 117

  • Download
  • Add to my manuals
  • Print
  • Page
    / 172
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 116
User’s Manual 111
4.7 RabbitNet Port
The function calls described in this section are used to configure the OP7200 for use with
RabbitNet peripheral boards. The users manual for the specific peripheral board you are
using contains additional function calls related to the RabbitNet protocol and the individ-
ual peripheral board.
Add the following lines at the start of your program.
#define RN_MAX_DEV 10 // max number of devices
#define RN_MAX_DATA 16 // max number of data bytes in any transaction
#define RN_MAX_PORT 1 // max number of serial ports
Set the following bits in RNSTATUSABORT to abort transmitting data after the status byte is
returned. This does not affect the status byte and still can be interpreted. Set any bit com-
bination to abort:
bit 7—device busy is hard-coded into driver
bit 5—identifies router or slave
bits 4,3,2—peripheral-board-specific bits
bit 1—command rejected
bit 0—watchdog timeout
#define RNSTATUSABORT 0x80
// hard-coded driver default to abort if the peripheral board is busy
Provides rn_init() with the serial port control information needed for OP7200 series controllers.
RETURN VALUE
None.
Deactivates the OP7200 RabbitNet port as a clocked serial port and restores the RS-485 driver for
RS-485 communication. This call is also used by rn_init().
PARAMETERS
portnum = 0
RETURN VALUE
None
void rn_sp_info();
void rn_sp_close(int port);
Page view 116
1 2 ... 112 113 114 115 116 117 118 119 120 121 122 ... 171 172

Comments to this Manuals

No comments