Skip to content

Read Inputs

AutomationDirect edited this page Jan 10, 2020 · 8 revisions

Read Inputs


Description

Read the 8-bit state of all inputs on a 'P1_HSC_Module' variable or read the 4-bit state of the four inputs of a 'P1_HSC_Channel' variable.


Usage

Used to read all input state bits (bitmapped in order) of a 'P1_HSC_Module' variable. These blocks return an integer whose bits contain the state of the module's inputs. The value of 'HSC' specifies which module to read, and the value of 'Channel' specifies which channel.

Bit mappings:

Read Inputs (HSC):

bit value
bit 1 1A
bit 2 1B
bit 3 1Z
bit 4 3IN
bit 5 2A
bit 6 2B
bit 7 2Z
bit 8 4IN

Read inputs (Channel):

bit channel 1 channel 2
bit 1 1A 2A
bit 2 1B 2B
bit 3 1Z 2Z
bit 4 3IN 4IN

Notes

  • These blocks may be used independently.
  • The second block only reads the state bits of one 'Channel' while the first reads the state bits of both channels.

Reference

Clone this wiki locally