Schneider M580 DFB In vs In/Out

Schnider

Member
Join Date
Aug 2016
Location
Perth
Posts
15
I have just jumped back on Schneider PLCs after a hiatus of a few years and it looks like Schneider have changed the way arrays are passed in and out of DFBs.

Originally (and if I remember correctly), with Quantums on Unity V9, you had to use an In/Out pin to pass an array into a DFB and the array was passed in by reference.

Today, on the M580, I see you can pass arrays in and out of a DFB via In, Out and In/Out pins.

I am curious if anybody knows which of these methods are passing by reference and which are passing literals? And, if there are any performance issues depending on how the arrays are passed as I would suspect passing an array as literals would be very CPU intensive?
 
I have not used the Schneider version, and I know they make a lot of changes over the top of standard CODESYS, but this reference will be of interest to you.

https://help.codesys.com/webapp/_cd...riable_types;product=codesys;version=3.5.15.0

To answer your specific q's
INPUT copies the variable
OUTPUT copies the variable
IN_OUT is pass by reference
Note that IN_OUT CONSTANT is "pass by reference read only" :)
And sure, copying an entire array has performance issues. Both in that you now have twice the memory footprint (three times if you have INPUT as well as OUTPUT) and also the CPU time needed to copy the array.
 
Thanks AustralIan, that is what I suspected.

Just trying to get all my ducks in a row before I make an argument for using in/out pins for some large arrays. Wouldn't like to find out my understanding of the M580 is wrong and then end up looking like a muppet.
 
I dont have an answer for your question but just wanted to say that the m580 has nothing to do with somachine (codesys). m580 is programmed with unity or the new name Ecostruxure Control Expert
 
To put it in layman's language
In a call to a function or block
IN means you can use the value but not write to it
OUT means you can only output it (not strictly true as on most systems you can read it but there you go)
IN/OUT means you can read & write to it. so it is considered both input and output often used when you want to say set a bit in a 16 bit word so preserving the other bits as per input value
 

Similar Topics

Looking for some advice on a project. The controller is a BMEP584040. There is a RIO ring with several drops with Quantum I/O. On this ring...
Replies
12
Views
962
Hi, Does anyone know if programming a Modicon M580 is basically the same format as an M340? Also do they use the same software package? Thanks...
Replies
2
Views
1,755
Hi Folks, We have this M580's configured as hotstandby and is curious if it is possible to monitor the modules on the remote racks. Unity pro...
Replies
1
Views
1,581
Hello, Wondering if anyone else out there has experienced issue with Scan Time on H58-6040 m580 processor. These controllers have a periodic...
Replies
3
Views
3,022
Hi all, Sorry to seek help here as I am run out of idea. recently i need to use my PLC(Schneider M580-Unitypro) as Modbus TCP Master to read...
Replies
2
Views
4,349
Back
Top Bottom