Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the Pally program we use variables to define IO channels in a generic way. The address of every IO channel is defined by a special variable, which is an array. The 0th element of the array is always the IO type (standard IO, configurable IO, tool IO, MODBUS, etc.) and the 1st element is the actual IO channel number.

Example values:

[0, 5] means standard digital signal nr. 5

[1, 6] means configurable digital signal nr. 6

[10, 5] means standard digital signal nr. 5 with inverted logic

etc.

For this article, the following special constantsIO types are relevant:

-11: always returns True (no real physical IO channel being accessed)

...

If you want to provide mock signals for the Pally program from another thread, set the data source of the corresponding IO channel type (element 0 of the array) to either -1 or -11 in runtime.

...