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

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
165
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
0
Views
68
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
91
I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
80
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
79
Back
Top Bottom