Passing a large INOUT to FC in S7-300

Here is an calling example of an AI block with a channel driver from an older PCS7 library from Siemens. The AI and the channel driver blocks are FB's, each instance has it's own DB (DI).
When I make the AI-blocks I normally integrate the channel driver.

Kalle

pcs7library.jpg
 
Yes, once you have declared a UDT the idea is to use it when ever you need to refer to the data structure.
 
hi L D[AR2,P#0.0] i admire this symbolic name so much it's really fantastic, I will be happy if you describe you shared program(inout) in details as there are some instruction which is unknown to me for instance
i know the meaning of the instruction SLD 3( shift lift double ) but i can not understand the program algorithm ,nevertheless the program is so good ragardless the degree of difficulty of the program ,honestly, i found dealing with pionter is difficult enough to understand , but if you had described the details of pointers , it would be a great job
or doyou have a short pdf file about pionters or indirect addressing for beginners ?
 
Please comment!!! If its bad please tell me, I havent done much S7.

Copying the DB to the temp area, performing the processing and copying it back again is a valid methodology. As you have already said, the temp area will have to accomodate your UDT, Eventually if the temp area gets too big the CPU will fault.

You are addressing the temp area absolutely - this may bite someone later if they decide to add another temp variable (outside the scope of your UDT) at the start of the temp area - the load/transfers will not copy all of the UDT data.
 
Your UDT appears to be 102 bytes long, not 100
There are various DBW references in your copy to/from temp/DB - I presume these are typos?
 
Here's your FC recoded as an FB with my FC99 setting up the instance DB according to the AI number. For brevity, I've used a few M flags to pass the parameters to the FB. To make the FB entirely data driven, you could add the PIW address to the UDT. I've replaced your one second flasher with M100.0
 
Here's your FC recoded as an FB with my FC99 setting up the instance DB according to the AI number. For brevity, I've used a few M flags to pass the parameters to the FB. To make the FB entirely data driven, you could add the PIW address to the UDT. I've replaced your one second flasher with M100.0

Great. Thanks very much for this. I'd still prefer to use my method if its not going to be a problem. Keeps all my control modules consistent.
 

Similar Topics

I'm using FactoryTalk ME version 13. I'm aware how to pass a parameter file once, but I was wondering if it is possible to do it twice...
Replies
4
Views
164
I inherited a project in which a ME application displays process measurements (temp, pressure, flow, etc) on a PanelView Plus display. The data...
Replies
4
Views
505
My first real attempt at utilising the AOI function in Compactlogix. The issue I'm having is, I have an array of INT[400], but in my AOI I'm only...
Replies
1
Views
470
Hi guys. Sorry for the dumb question but I am still new. I have learned to pass Parameters using an HMI tag so far. Can I write directly to the...
Replies
1
Views
929
Hi guys, A dumb question, but is it possible to pass values to tags using parameter files in Ftview SE ver 11? TIA
Replies
2
Views
1,472
Back
Top Bottom