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 have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
36
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
53
I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
90
Is there a way to reset the count on the RS Logix BackUp?? XXXXX PROGRAM IN PROGRESS_BAK445.RSS XXXXX PROGRAM IN PROGRESS_BAK446.RSS XXXXX...
Replies
8
Views
245
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
269
Back
Top Bottom