plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ecostruxure machiine Basic User defined function block help.

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Schneider Electric
View previous topic :: View next topic  
Author Message
watty
Junior
Junior


Joined: 28 Feb 2018
Posts: 2

PostPosted: 05/11/2019 11:22    Post subject: Ecostruxure machiine Basic User defined function block help. Reply with quote

HI.
I am trying to create a function block where i will us an array and function ROL_ARR and then MEAN functions . this is to create an average from the input.
i have a problem to făcute an array and then roll it with the function ROL_ARR.
In standard POU's i dont have a problem to create an array but in UDFB i do.
can anyone please help me or point me where to find the answer?
thank you
Back to top
View user's profile Send private message
watty
Junior
Junior


Joined: 28 Feb 2018
Posts: 2

PostPosted: 07/11/2019 12:05    Post subject: Reply with quote

Thank you for your reply.

Note: In these examples the Array of INT is located at %MW2600 - %MW2699.

This is exactly what i would like to avoid because it makes reusability of the function block unusable.
I am trying to keep the array inside the function block ( somewhere in VAR) if that's possible.
i need to reuse the function block more times without changing it too much.

thank you for your help.
Back to top
View user's profile Send private message
chusebizen
Junior
Junior


Joined: 25 Sep 2015
Posts: 10

PostPosted: 11/03/2020 23:40    Post subject: Reply with quote

First of all,

The topic is related to EcoStruxure Machine Basic, and the examples shown are from Unity.
EcoStruxure Machine Basic, is what one or two years ago was called SoMachine Basic.
Both softwares are from Schneider, but quite different. The former is a very low capabilities sw (but i think enough for the PLC that programs), where the UDFB have a very reduced capability format, and where there is not the chance to assign complex variables to UDFBs.
In Unity you can create an UDFB, with I, O, I/O, private and public variables, and these variables can be discrete (bool, word, double, float) or complex (arrays, structs...) . Then the block can be reusable and the I, O, I/O and public variables can be accesed by <UDFBname>.<variablename>.

What is not possible to do in EcoStruxure Machine Basic is to have complex variables around a UDFB.
Please do not forget that this software is intended to to program only the M221 Schneider PLC's. That's the lowest PLC range from Schneider, designed for very small machines.
In EcoStruxure Machine Basic UDFBs, there are Input bools, output bools, (no I/O variables) %PARAM (that can be considered I/O, and each PARAM can be word, double or float, and I think maximum 32 per UDFB, not sure), and %VAR (that can be considered private variables, and each LOCAL VARIABLE can be word, dublu or float, and I think maximum 32 per UDFB, not sure). At least the %VAR variables are remanent trough scan cicles, but not observable nor accesed outside the UDFB.

Before Somachine Basic 1.6 (former name of the sw) it was not possible at all to create UDFBs, only in newer versions. But the sw it is free and the PLC is very cheap.
The good think is that with every new version, new capabilities are available. But this will never be neither Unity (now called EcoStruxure Control Expert) nor SoMachine (now called EcoStruxure Machine Expert)

Then you can make the code but doing yourself the rotation of the VAR% variables, and then the total sumation and mean value. Tremendous job without arrays, but doable.
At least you can use Structured text code and not only ladder.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Schneider Electric All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro