Step 7 Multi-instance question...

uptown47

Lifetime Supporting Member
Join Date
Feb 2008
Location
Over there, next to those boxes
Posts
1,146
Hi,

I'm doing some experimentation to try and expand my knowledge of Step 7 (specifically multi-instance stuff).

I've created an FB with two SFB 4's (TON) in the STAT area.

They are called:
firstTimer
secondTimer

I've then created another FB and put the first FB in the STAT area of that under the name: myTimers

From this FB I can access variables called:
#myTimers.firstTimer.IN
#myTimers.firstTimer.PT
etc etc

But I can't seem to get the timers to work. Is this possible to have a kind of 'nested' multiple instance???

It might simply be a problem with my code. The "myTimers" block in my Multiple Instances folder doesn't have any inputs or outputs, it's just a block.

My code in the main FB looks like this:
Code:
L  T#5S
T  #myTimers.firstTimer.PT
 
A  I 0.0
=  #myTimers.firstTimer.IN
 
L  #myTimers.firstTimer.ET
T  MD 140
 
A  #myTimers.firstTimer.Q
=  Q 7.0

As I said, maybe it's just a problem with my code or maybe I'm missing something else.

Can anyone clear this up for me?

Many thanks

:D
 
Are you calling the IEC timers in the multiinstanced FB ?
It is not enough to set aside the data to be used by the IEC timers.

Are you testing it with PLCSIM ?
There have been problems with the IEC timers in several versions of PLCSIM.
 
Are you calling the IEC timers in the multiinstanced FB ?
It is not enough to set aside the data to be used by the IEC timers.

Are you testing it with PLCSIM ?
There have been problems with the IEC timers in several versions of PLCSIM.

Hi Jesper,

You're a genius!!

I put in the call out of the Multiple Instances folder to myTimers and the software worked!!

(I am using PLCSim by the way. v5.4 SP4 and it seems to be ok so far.)

Many thanks

John ;-)
 

Similar Topics

Hi, I have a simple function block that does not function when I use multi instance SFB4 IEC Timer On Delay. I could not attached a zip of the...
Replies
7
Views
9,102
When you create a Function Block in step 7 there is a ticky box for Multiple Instance Capability. I understand what it is but wondered why you...
Replies
2
Views
2,015
Is it possible to view online an multi-instance FB ? How do I now that I see the correct values?
Replies
9
Views
6,354
I am working on a new View ME project for a demonstration display using a PC Hosted version of ME Station. I would like to show a cylinder...
Replies
4
Views
3,183
Hi. I've got: CPU 317-2 DP / 6ES7 317-2AK14-0AB0 CP 342-5 / 6GK7 342-5DA03-0XE0 CP 343-1 / 6GK7 343-1EX30-0XE0 Basically S7 gathers a lot of...
Replies
7
Views
2,630
Back
Top Bottom