InWord
Description: | Read I/O Word. This function reads a 16 bit unsigned word from an I/O port. |
Returns: | Word |
Usage: ![]() |
Script or steady state. |
Function Groups: | Memory I/O |
Related to: | In | Out | OutWord |
Format: ![]() |
InWord(Port) |
Parameters: |
Port |
Required. Any numeric expression that gives the I/O address. Port must be in the range 0 to 65535. |
Comments: | This function requires that the VTSIO driver be installed. Please refer to the topic, Communicating Directly With Hardware for more details. This is a high priority function. If InWord is used in a state, it will be evaluated at a very fast rate. InWord should be used sparingly to avoid reducing system performance. |
Examples:
reg = InWord(0x300);
This reads reg as a 16 bit unsigned word from input port 300 hex. If this statement appears in a script, it is executed when the script is executed (when the action is triggered). If it appears in a state, it will be updated rapidly as a high priority function.