MASTER YOUR CASTLE with your new build or reno project
Enter competition

How can the analog I/O be forced in a M340 application?

FA199088

30/04/2019

Use the IODDTs, T_ANA_IN_BMX for inputs and T_ANA_OUT_BMX for outputs in conjunction with the WRITE_CMD function block.
Once the WRITE_CMD function block in enabled, the two variable below of the IODDT, can be used to force the analog value. First assign the value (CMD_FORCING_VALUE) and then set the bit (FORCING_UNFORCING_ORDER). Reset the bit ((FORCING_UNFORCING_ORDER)) to unforce the analog channel.

Standard symbol Type Access Meaning Address
FORCING_UNFORCING_ORDER BOOL R/W Forcing/unforcing command. %MWr.m.c.4.13
CMD_FORCING_VALUE INT R/W Forcing value to be applied. %MWr.m.c.5

In order to force a channel, you have to use the WRITE_CMD (%MWr.m.c.5) instruction and set the %MWr.m.c.4.13  bit to 1.
To unforce a channel and use it normally, you have to set the %MWr.m.c.4.13 bit to 0.


Legacy KB System (APS) Data: RESL211873 V1.0, Originally authored by DaSo on 06/25/2013, Last Edited by DaSo on 06/25/2013
Related ranges: Modicon M340