Elmomc Multi-Axis Motion Controller-Maestro Uživatelský manuál Strana 224

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 313
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 223
12.3.1 MODBUS Master Object Communication Control
Functions
NOTE:
Here the iStaticArray – int static array is defined by the user
To use Static Array as a function parameter, a ‘::’ symbol must be used before the
Static Array name.
1- int retVal = openProtocol()
Connects to a MODBUS slave (server)
Returns: 0 on success or error code.
Example:
masterObj.openProtocol()
2- int retVal = closeProtocol()
Closes a connection to a slave (server)and releases any system resources
associated with the connection.
Returns: 0 on success or error code.
Example:
masterObj.closeProtocol()
3- int retVal = isOpen()
Returns whether currently connected or not (1 if open)
Example:
if( !masterObj.isOpen() )
masterObj.openProtocol()
end if
12.3.2 MODBUS Master Object Bit Access Functions
For Modicon Register Table 0:00000 (Coils) and Table 1:0000 (Inputs).
1. readCoil(int coilAddress)
MODBUS function code 01.
Reads the
status of a single discrete output (coils, 0:00000 table) in a remote
device (server).
Maestro Software Manual Ethernet/IP Communication
MAN-MASSW (Ver. Q)
12-4
Zobrazit stránku 223
1 2 ... 219 220 221 222 223 224 225 226 227 228 229 ... 312 313

Komentáře k této Příručce

Žádné komentáře