S7 question

DeHulk

Member
Join Date
Mar 2003
Posts
74
hello !
at work we use FC 0 to force inputs
example M0.1 -= I 100.0
M0.1 is always logical 1

question : is there a possibility to check the real state of the input in S7 while it's forced or is it necessary to check hardware

btw does the led at the inputcard lights up if you force an input ? didn't check that actually :)

hoop my question is clear cause my english is poor -:)
Greats DeHulk
 
That's a pretty interesting thing to do. I've never tried forcing inputs that way.
If you want to know the status of the input, copy the input byte to a storage byte before you do your forces:

L IB100
T MB10

Then look at MB10 for the actual input status.

I don't think the status of your forces will be reflected at the input module. Those LEDs are typically driven by the module itself, not the PLC firmware.

Keith
 
The inputs and the LEDs work independantly from the code. The accual periphial inputs update the processor at the BEGINNING of of OB1. I tested your idea of forcing the inputs, strange, but it works.
Write this in your code. OB1 and FC1 Normally OB1 will execute the normal code. When m0.0 is set, the jump to FC1 will cause the forcing.

OB1
A I 100.0// read accual input
= Q 0.0 // accual result

A M0.0 // forcing ON
JC FC1// forcing block

FC1
A m 0.1 //always on
= I 100.0 // forced input

A I 100.0 // forced input
= Q 0.1 // forced output.
 
Of course it works! This is THE way to do forcing if the PLC systems doesn't provide in forcing any other way. You call a block to force the inputs at the beginning of the main program (OB1 with Siemens PLC's) and you can do the same with the outputs by calling a forcing block at the end of the main program. I've done it with Siemens S5, S7-200, S7-300 and OMRON CQM1. It's simply fooling the PLC by fiddling with input and output image tables.

Kind regards,

Jean Pierre Vandecandelaere
 

Similar Topics

I recently uploaded an aplication from a Panel View, created a new screen and now that I've downloaded it to the Panel View, all the texts have...
Replies
9
Views
161
I have never had the pleasure of working with a "Thermistor" until now and have a question. The Thermistor is a 10KOhm 4-20mA 2-wire device and I...
Replies
4
Views
142
Hi All, So I have a main routine with an instruction that's executed by XIC "Run" I have a JSR located on a rung below it. In the logic for that...
Replies
6
Views
244
I have a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
106
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
201
Back
Top Bottom