Topic: DMD0158

Help File Version: 2.9.4.37

 

HWINFO - Get Hardware Information


The Get Hardware Information (HWINFO) instruction is used to retrieve hardware-specific information from an I/O module. This instruction allows a Do-more CPU to confirm at runtime that an I/O module is present, or missing; or confirm that a module in a particular slot has the required I/O count, etc. This instruction is also useful for determining if an I/O module that is marked as "Optional" in the I/O Configuration is present at runtime.

 

 


Parameters:

Note: Use the F9 key to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.

 

Information Type selects which piece of information to retrieve from the module in the specified I/O slot:

Module ID gets the module's factory-assigned ID:
 

The list of Module IDs for Discrete Input, Discrete Output, and Combination Discrete modules in the BRX, DL205 and Terminator series is available here: Discrete I/O Modules.
 

The list of Module IDs for Analog Input, Analog Output, and Combination Analog modules in the BRX, DL205 and Terminator series is available here: Analog I/O Modules.
 

The list of Module IDs for Ethernet and Serial Communication modules in the DL205 and Terminator series is available here: Communication Modules.
 

The list of Module IDs for CTRIO and CTRIO2 modules in the DL205 and Terminator series is available here: CTRIO / CTRIO2 Modules.
 

X Count gets the number of discrete input points.

 

Y Count gets the number of discrete output points.

 

WX Count gets the number of signed WORD (16-bit) locations for analog inputs.

 

WY Count gets the number of signed WORD (16-bit) locations for analog outputs.

Master selects which of the configured I/O Masters has access to the Base containing the target I/O module. For more information on I/O Masters see the I/O Configuration section of the System Configuration help topic.

Select LocalIOMaster for modules located in the base with the Do-more CPU.

 

Select $EthIOMaster for modules installed in Ethernet I/O Slave bases.

Base selects which base contains the target I/O module. This list will contain the an entry for the local I/O base and all of the currently configured Ethernet I/O slaves (if they exist).

 

Slot specifies which slot contains the target I/O module. This can only be a constant value between 0 and 15.

BRX systems begin with slot 0 meaning the on-board I/O, and slot 1 is the first expansion I/O module position.

 

DL205 systems begin with slot 0 in the module slot adjacent to the CPU.

 

Terminator systems begin with slot 0 as the first expansion I/O module position.

Output specifies a numeric location to store the resulting data. This can be any writable numeric location. A return value of -1 indicates the query failed; this typically means an invalid slot was specified.

 


Related Topics:

DEVREAD - Read Device Register

 

DEVWRITE - Write Device Register

 

HWCONFIG - Configure Hardware

 

RD - Read From Intelligent Module

 

WT - Write To Intelligent Module

 


See Also:

DATAINFO - Query Information about Data Memory

 


Rung Example: