Direct Input / Output Siemens S7

arc

Member
Join Date
Dec 2004
Location
India
Posts
66
Dear S7 Experts,

Can any one tell me how to set/reset a Digital Output, not linked with the scan time. For example I would like to set a Digital Output exactly 2 millisecond or a user defined milliseconds (1 millisecond resolution expected), after my PLC senses a digital input signal. Both signals (Digital Input and Digital Output) should not depend on the program cycle time or scan time, (Interrupt driven), is Interrupt OB the way to do it, if so can you explain with a small example.

Thanks.
 
You won't get 1ms resolution from the OBs. The best that you'll get is 10ms and even then you'll only get that on a series 400 CPU.

The best available on my S7-317-2 DP is 100ms.

There is a solution though, actually two.

One is the FM352 Cam controller, I've never used this, but for simple delays and so on it should do the trick. I'm pretty sure it'll easily meet your 1ms resolution. In Germany it costs about 680€ including development S/W.

If that's not up to the job, or you need more programming functionality, then the FM352-5 High Speed Boolean Processor will definitely do the job. As the name implies this is a full blown (parallel) processor. This will give you 10µs resolution. It costs about 870€ in Germany.

The FM352-5 (and for all I know the FM352, as well) will drive you mad when you first try to get into it. If you do decide to go this route, do a search here for "Tips and Tricks FM352-5" and you'll save yourself about a week of pure frustration. banghead
 
Last edited:
Thanks, RMA .

Looks like I will need to do some reading on both Cards before I can ask further questions. But as you say it looks like a good possible solution if it works !!

Thanks again ...
 
Arc, like RMA said, this should really be done with a special card.

But, if you are using an S7400, I think you might be able to come close. The system clock in a 400 has 1ms resolution, so if you spread a bunch of SFC64 calls throughout your program, you could develop a 1ms time tick. Then, you could try an immediate update of the output with SFC27. Keep in mind that even if this worked in principle somehow, you would still have problems with remote DP IO, since you would be dependent on the profibus IO update times.

Another option would be to check out SFC47. It is a programmmable wait function, and although I've never used it, it looks like you could sense the input, set the wait for 2ms, and the set the output with SFC27.

But in reality, the 1ms resolution is sort of pointless. For one thing, your input does not have 1ms resolution. If you have a 15ms scan time, it's possible that the input actually went true 15ms ago. Plus, with regular cards, the rise time of an input can be 4ms. To do it properly, you would want to use a hardware interrupt input, in which case we start getting back to special function cards anyway.
 
Hi arc,
You could try this way:
- get interrupt capable input card,
- put OB40 and OB20 in your program,
- allow calling OB40 by edge detected on this card (reaction time ca. 200us on S7-300, 50us on S7-400) in HWConfig,
- in OB40 call SFC32 (SRT_DINT) with delay of your choice,
- in OB20 set/reset your output.
 
SFC47

Dear S7Guy,

In fact SFC47 type of a function was what I had in mind, I guess I will give this a try too. I understand the basic delays in sensing the Digital input. This kind of function I would like to keep at the central Rack based I/O in S7400 System, i.e. distance is not my problem.

I wish this SFC47 could handle Interrupt based digital input with time tagged data with the required time resolution; I have to read and check back on this too. I am happy to know two wise men on s7 here.

Thanks all.
 
WOW JAVKED !!

Dear jacekd,

WOW !!
You read my mind.

Your solution gave me an aswer to another question i was going to POST Later today.

Nice knowing so many people here who know S7 so well and smart.
 

Similar Topics

Hey, I am entirely new to PLC's and am trying to help my friend with a project. He wants to take the signal from a PNP photoelectric sensor as...
Replies
12
Views
2,229
Greetings all, In a project I'm working on, we have an 4-20ma temperature transmitter linked to an S7-1200's analog input (0-10V reading 2-10V...
Replies
3
Views
1,722
HI, Hopefully someone can point me in the right direction, the problem im having is with a direct logic 205 PLC DL260 CPU. The PLC in running a...
Replies
2
Views
4,145
I need to know if a high speed input card will be sufficient enough to pickup up the flow in a metering line with a flowmeter and a 24vdc pulsed...
Replies
21
Views
5,074
Hi All Anyone have an easy program to test inputs on an Automation Direct input card? Another tech at work is pulling these cards out of several...
Replies
2
Views
2,107
Back
Top Bottom