Auxiliary variables [message #1862728] |
Fri, 22 December 2023 21:59  |
Eclipse User |
|
|
|
Hello, I have a question regarding the creation of variables. Suppose I want to create a 32-bit variable that will be stored in the memory of the RT1060 microprocessor. Do I need to create a block that stores this memory so I can use it in another situation, for example, to store the state of a button? Or does the forte compiled within it already store this data in memory?
My idea is to use the IW block for this. Do you have any examples of this?
|
|
|
Re: Auxiliary variables [message #1862729 is a reply to message #1862728] |
Fri, 22 December 2023 23:32   |
Eclipse User |
|
|
|
With the information you provide this is hard to say. In general the input and output blocks will store at there pins the last state. Examples are the wago modular io or embrick.
|
|
|
|
Re: Auxiliary variables [message #1862750 is a reply to message #1862743] |
Wed, 27 December 2023 15:46   |
Eclipse User |
|
|
|
I'm not sure what you mean with auxiliary variables. If you mean global variables, then the answer is no. IEC 61499 does not have global variables in its language definition. However FB hold the variables on their inputs, outputs and their internal variables.
|
|
|
|
|
|
|
Re: Auxiliary variables [message #1862827 is a reply to message #1862824] |
Sat, 30 December 2023 18:17   |
Eclipse User |
|
|
|
Yes Alois, i read the tutorials and made the examples. My question is about create variables to be used in my program. By example, i use this variable to read a button, but use her another time to activate some output. Like with plc. In the image, the coil DNi is a internal variable to be used in the line 3. I want know if in 4diac this is possible. If i can define a variable int or real. And use this variable where i want in my application.
|
|
|
Re: Auxiliary variables [message #1862831 is a reply to message #1862827] |
Sat, 30 December 2023 21:53   |
Eclipse User |
|
|
|
For reading a button you would have an IX block. You can connect the output of this block to several of your other block to check the value and perform according control actions. The same is for analog inputs where you would have an IW or ID block, followed by an according conversion.
|
|
|
|
|
|
|
Re: Auxiliary variables [message #1862963 is a reply to message #1862962] |
Mon, 08 January 2024 20:01   |
Eclipse User |
|
|
|
Or maybe even a custom AI block with a word input and REAL input for the upper and the lower range of your sensor which is then converting to the REAL value you need. Because I would expect that the analog input is just delivering the ADC value as 16 bit integer or?
|
|
|
Re: Auxiliary variables [message #1862964 is a reply to message #1862963] |
Mon, 08 January 2024 20:09   |
Eclipse User |
|
|
|
The input Analog of RT1060 is 12 bits. In the case i will construct this block AI to use this like a variable. And when i need of the value i use this block. Thanks for the help Alois.
|
|
|
|
Re: Auxiliary variables [message #1863055 is a reply to message #1862965] |
Fri, 12 January 2024 20:54   |
Eclipse User |
|
|
|
Hello Alois, I'm working on development and I would like to understand the following question. My client wants me to create variables of 3 types in my 4diac application. A bool, a DINT and a REAL. If it were an application in C it would be like this:
bool A;
intB;
float C;
To do this, would I have to create this in a SIFB or is there a block that could do this?
|
|
|
Re: Auxiliary variables [message #1863072 is a reply to message #1863055] |
Sun, 14 January 2024 17:13   |
Eclipse User |
|
|
|
Hi André,
not sure if I can answer this in a forum post without more information. Would it make sense that we setup a vritual meeting to discuss a bit more the requirements of your client?
BR,
Alois
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06453 seconds