How to use hardware IOs in the TIAX direct application loading workflow

0
Hello,    I am wondering how is it possible to access hardware IOs within AX Code?  Where to define PLC Tags?    Thanks in advance! 
asked
2 answers
1

Here a link to the documentation.

 

Directly represented variables define access to inputs and outputs of the PLC via their absolute addresses.

An absolute address consists of:

  1. the percent sign %
  2. a location prefix  ("I" for inputs or "Q" for outputs),
  3. an optional size specifier (none and "X" for 1 bit, "B" for 8 bits, "W" for 16 bits, "D" for 32 bits, "L" for 64 bits),
  4. a numeric address 

They can also overlap

VAR_GLOBAL
    someInput1 AT %I0.0 : BOOL;
    someInput2 AT %I0.0 : BOOL; // warning, address of someInput2 overlaps address of someInput1
    someInput3 AT %IW0 : INT; // warning, address of someInput3 overlaps address of someInput1

    someOutput1 AT %Q0.0 : BOOL;
    someOutput2 AT %Q0.0 : BOOL; // warning, address of someOutput2 overlaps address of someOutput1
END_VAR

 

answered
1

You need to configure the IOSignals in a VAR_GLOBAL section within a CONFIGURATION

 

CONFIGURATION IoSignals

    VAR_GLOBAL
        S_3_manualON AT %I10.0 : BOOL;
        P_3_conveyorsForward AT %Q10.5 : BOOL;
    END_VAR
    
END_CONFIGURATION

 

answered