chusebizen Junior

Joined: 25 Sep 2015 Posts: 10
|
Posted: 11/03/2020 23:40 Post subject: |
|
|
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. |
|