S7 FC84 ATT function

wasim

Member
Join Date
Apr 2006
Location
Bokata
Posts
9
Hi all,
I have a strange behaviour with the ATT function. I have a block with WORD data type . When I use the ATT every think is OK. I turned the data type to INT . The commands I wrote usinf the ATT function still working, but When I try to *** a new one always I get an error.

This is the OK code:
A L 0.0
JNB _008
CALL FC 6
EventType :=W#16#302
EventGoodParts:=DB13.DBW68
EventBadParts :=DB13.DBW72
EventTime :=DB13.DBW76
_008: NOP 0



This is the illegal code :
A L 0.0
JNB _008
CALL FC 6
EventType :=W#16#8002

EventGoodParts:=DB13.DBW68
EventBadParts :=W#16#0

EventTime :=W#16#0
_008: NOP 0

The FC 6 is a custom function that gets four WORD parameters and us the TDD function.

What can be the problem, please help.
Regards...

 
I suggest you read your previous posts concerning Step 7 and word/int problems. You have not commented on the replies given to these previous posts - why ?
 
I did what you posted, I redeclared the WORD data types to INT and solved the problm. But I still have this trouble problem.
 
What are the data types for EventGoodParts and DB13.DBW68 ?
How did you create the illegal code you have posted?



 
The block data types are WORD , the EventGoodParts is a WORD data type.

Anyway , When I switch to STL , and tried to write the code for the same target , then every thing is IK.:rolleyes:

Thnaks allot...
 
It might help you if you adopted a standard naming function for variables. For example I would use wEventGoodParts as the parameter name.
Other names might be:
bReply
iCount
rMaximumValue
dwPointer
diBigCount
 

Similar Topics

Hello!! help Needed I've been trying to Use FC84 to LOAd Data into table but it dont work. Anybody ever use it with success??? Then i simulate...
Replies
2
Views
4,674
Dear All I am using FIFO with FC84 & FC85 in S7. I have got problem which does not clear the table. Is anyone know any logic to clear the table...
Replies
0
Views
2,169
Dear All I hope you are all well. I would like to know how to use FC84 with FC85. I have a task to start around 10 pumps at round 20 seconds...
Replies
1
Views
2,916
Hi all, I need your help with the TDD (FC84) function. I tried it and every thing is OK, But there is a problem with the data input. I have to...
Replies
1
Views
3,708
Can anyone please explain and show me an example in Ladder how do I use FC84 (ATT) and FC85 (FIFO) in siemens S7-300. As I don't understand it by...
Replies
0
Views
1,830
Back
Top Bottom