Add On Instructions and Feedback

AutoJig

Member
Join Date
May 2013
Location
NYC
Posts
14
Hi All,

I wrote code for Add on instruction and its working well with my static control operation. I have another application where I have dynamic operation.

For logic, I have to send value for index and ones my operation execute that I need to get updated status from that operation. If I wait for feedback then controller go in fault condition.

Any one ever tried to use AOI and use feedback functionality ?

Thanks
 
Describe what you are trying to do in the real world.
Post the code you have.
Describe how it is failing to do what you want.

From your very generalized description, the only comment I have is: Generally, "waiting" for anything in PLC code will fault the processor.
 
Here is sample and simple code.

Repeat

If ET1.state. = 1 then
i = i + 1;
End if

ET1.Cmdstop. = 1;

Until i= Total_Operations

End_repeat;


Where i is index used in AOI and Operation ET1. If i-index change without getting state updates from ET1 operation then It will look next operation

I have to wait until operation don't give me updated state. but this way I can not use waiting , I tried to do some fake calculation in else condition but that dont work either.
 
You may have to change your thinking

Try something like the following - The code must be called every scan and must exit every scan and be re-entrant (ie remember where it was in the loop from one call to the next)

IF i <> Total_Operations THEN
If ET1.state. = 1 then
i = i + 1;
End if

ET1.Cmdstop. = 1;

ENDIF


If you want to loop say 100 times before exiting then try the following

Counter = 0
Repeat
Counter = Counter + 1;
If ET1.state. = 1 then
i = i + 1;
End if

ET1.Cmdstop. = 1;

Until i >= Total_Operations OR Counter > 100
End repeat



Note: we are not initializing i that is done elsewhere
 

Similar Topics

In RSLogix5000 I am attempting to create an add-on instruction called "SWAP" which simply swaps the values of two integer tags. Here is what the...
Replies
5
Views
1,934
Hello everyone, Currently I am translating my Siemens program (SCL) to Allen Bradley (ST) and i am having a little trouble using the Add-On...
Replies
2
Views
1,497
Hi Everyone, I am working on project that the customer require no ADI. The standard project we have uses ADI everywhere. I am just wondering...
Replies
11
Views
2,352
hi all, can you guys please explain the why we use AOIs? My understanding is that they can be used like templates, so we create them once, and...
Replies
4
Views
2,460
Hello everybody, From user manual "ControlLogix SIL2 System Configuration", SIL2 Add-on Instructions is required to configure SIL 2 PLC...
Replies
0
Views
1,152
Back
Top Bottom