PLCS.net - Interactive Q & A

PLCS.net - Interactive Q & A (http://www.plctalk.net/qanda/index.php)
-   LIVE PLC Questions And Answers (http://www.plctalk.net/qanda/forumdisplay.php?f=2)
-   -   Forcing analog input value in Modicon M340 (http://www.plctalk.net/qanda/showthread.php?t=113260)

razmis December 7th, 2017 02:55 AM

Forcing analog input value in Modicon M340
 
I want to force an analog input value in a Modicon M340 PLC.
I work with Unity Pro XL.
The problem is that the Unity Pro doesn't let me set a value to the CMD_FORCING_VALUE parameter not to the FORCING_ORDER bit.
I am able to force digital inputs and outputs.
What can be the problem?

Saffa December 7th, 2017 04:53 AM

Quote:

Originally Posted by razmis (Post 761363)
I want to force an analog input value in a Modicon M340 PLC.
I work with Unity Pro XL.
The problem is that the Unity Pro doesn't let me set a value to the CMD_FORCING_VALUE parameter not to the FORCING_ORDER bit.
I am able to force digital inputs and outputs.
What can be the problem?

You cannot force analogs. That's why i decouple all my analog inputs via a custom DFB that lets me toggle between a simulated value and a real value.

Lare December 7th, 2017 04:19 PM

You need to use write_cmd block for transfer forcing setting for IO-card (Search from help file: Detailed Description of T_ANA_IN_BMX-type IODDT Objects)

Another way is to use WRITE_INPUT_INT-block with %IW address.

And as Saffa writed, you can write own force block with move or selector blocks.

Saffa December 8th, 2017 02:28 PM

Quote:

Originally Posted by Lare (Post 761475)
You need to use write_cmd block for transfer forcing setting for IO-card (Search from help file: Detailed Description of T_ANA_IN_BMX-type IODDT Objects)

Another way is to use WRITE_INPUT_INT-block with %IW address.

.

I knew you could do that with bits, but didn't know it also applied to analogs. Learnt something new today!

ganutenator December 8th, 2017 05:27 PM

I think they have a built in function block to do what you are trying to do. Haven't used it myself.


All times are GMT -5. The time now is 01:51 AM.

.