Import

Hi all,
I'm new (very new) to PLC (and it seems like Schneider help is useless) so I hope someone will save me….

Does anybody knows how to load a 2D array (text file) into a variable (I want to load it once and to make sure it stay the default for that variable)

I created a new DFB. I can use it if I use the FDB language but trying to insert it in a ST base section generate an error (seems like the DFB is unrecognized). It looks like I have to define the function also in the derived FD instance but the way to do that (and why….) is unclear.
Last, Assume my DFB (named MY_f) is C:=A+B
I would like to be able to write the following in the ST format:
Z:=MY_f(In1,In2)+4; - just like the build in function sin(x) works.
On the other hand, if MY_f has two outputs the way I would like it to work is:
(Out1,Out2)=MY_f(In1,In2) or
MY_f(In1,In2,Out1,Out2)
is there a way to do that? I could only get the second way to work.
thanks, Erez
 
Not sure about 2D arrays, but for a 1D array you would declare it in the variable table enter the default values in the value field, then to make it a constant right click on the variable from the drop down menu select 'data property' then tick the constant selection.

For the dfb - defining it does not create an instance, so when you use it in a FB section of code this will automatically create the instance. To create an instance without inserting into an FB section of code - go to the variable table and select the function blocks tab now create a new function block (add a line to the table) of the type that you named the dfb
Not sure about the rest of your question on ST I mainly use FB
 
for the 2D array import - i have a 2D data file (created in excel) that i want to load its values into a variable. I tried the import - but it did not work

As for the dfb defining - thanks, Ill give it a try
 

Similar Topics

Hello all, We have a project that uses GE iFix version 2023. We are looking to export existing screens (into some text-based or similar format)...
2
Replies
149
Views
Ive been editing a screens shortcuts tags via Notepad++ to make edits quicker, however I've been noticing that my screens shift around when...
1
Replies
181
Views
In studio 5000, is there a way to mass import tag values? I understand how to import the tag itself but can't find a way to mass import data to...
10
Replies
943
Views
Hello All! I am working on a project in EcoStruxure Control Expert v15.3 and I need to create hundreds of the same DFB. It's pretty crazy but...
9
Replies
2,202
Views
In CCW v23 Standard Edition on Win 11, I'm trying to import a program written using CCW v12 Developer Edition on Win 10, and it's giving me errors...
8
Replies
2,155
Views
Top