Siemens S7 programme error

robert mooli

Member
Join Date
Aug 2004
Location
kampala
Posts
36
Hi members any one to help me we have s7 programme , now i have noticed that one of the actual parameters of the calling block is not bieng passed on the formal parameters of the called block and yet the called block is working properly with other calling blocks , what sould i do am stuck plse help
 
If you are using the Variable Declaration Table that you can drag down at the top of Function Editor window then make sure that the parameters are spelt correctly in your code...

#Motor_speed

is obviously NOT the same as

#Motorspeed

but as Fritz says, if you could re-phrase your question to clarify it slightly that would help.

Cheers

JT :)
 
Is this a Function Block (FB) or a Function (FC) ?

With a Function, every formal parameter must have an actual parameter assigned to it.

With a Function Block it is quite permissible to have a formal parameter with no actual parameter assigned. The method of operation for all IN, and IN/OUT parameters when the FB is called is that all the actual parameters available are read and their values are stored in the Instance Data Block. The execution of the block code is then begun based on these values. Where no actual parameter is assigned the default value stored in the data block when it was created is used.

Regards

Ken.
 
Thanks Ken , i realised the parameters in the DBI doesnt reflect those in the variable dec table of this associated FB hence giving some erratic results am trying to cosult if or how i can regenarate this instant data block again
 
instance DB Creation

Dear

This is DBI or DB1? If DB1 means please delete the Instance data block.Please do the following

In OB/FC,Please

CALL FB(Number),DB(Number)

DB should be unused DB Number.Once you enter the system will ask

you want to create instance DB? Click Yes.

Now The instance DB has created.

Now you can check the values in Instance data block and Vat

Thanks
 
thanks i have tried this
i deleted these DI in the blocks folder , changed the DB no from 609 to 715 regenerated the DBI , but still the DBI data structure remained the same and doesnt reflect that of variable declaration table. may be something else wrong please advice
 
Are you trying to create multiple Instances ie FB1,DB1 - FB1,DB2 etc or replace the Instance DB assigned to the FB?

Have you ran "Check block consistancy" to see if any errors are present?

When the new DB was created did you change the setting from shared to instance and if you wanted multiple instance capability did you define it that way.

Still more information needed i think.

Steve
 
No stevo not multiple instance, What happens is we have two FBs ie fb 162 and fb 303 having 6 motors and 3 motors blocks respectively in the code section ie ntwk 1,2 etc , but when i check the DBIs in OB1 are called differently and yet the contents are for both blocks FB 162 and 303 so how do i seperate them such that fb 162 has its own DBI and so fb 303. What i know the data structure in the caling fb should reflect what is in the the inst.data blck ie the data in first block shd be same as the data in the DBI etc , am new in this but am trying ma best to catch up
 

Similar Topics

Dear friends can u telL me the steps of how reloading programme of SIEMENS STEP 5 PROGRAMME of 115U processor using Siemens SIMATIC FIELD PG ,IT...
Replies
3
Views
3,323
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
213
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
76
Hi everyone hope you'll well. Is it possible for me to download a Crack version of tia portal v13..sorry to say this but the software is very...
Replies
5
Views
171
I have established an online connection to a machine using an S314 processor. I am using an mpi connector and simatic manager. The online...
Replies
8
Views
154
Back
Top Bottom