Refresh / update of variable types

When I call a Function Block (FB) that has variables defined as inputs inside it, no structure appears when I call it.The same happens if I create a type and then look for it in the structure types, I can’t find the new added variable.

It seems like a refresh or update is missing after saving and compiling, because it still doesn’t appear.

Do you have any suggestions? Has this ever happened to you?

Hello Enrico, welcome to the community

May I ask you to be a bit more specific? Like which FB are using, what structure?

-When you say no structure appear, you mean in watch windows? If so, you need to add the variable/FB to the watch windows to have it updated., if you have modified structures, you need to re-add the modified variable to the watch window for it to be shown, since newer part of the modified structure are not added automatically to the watch windows. Also, for it to be shown in watch windows, a transfer is needed.

-If you mean the autocomplete of the structure / FB (when press ctrl + space), make sure that the declaration of the new variables (.var file) and the .typ has been saved before you tried to autocomplete it in the code. Remember that a FB need to be declared as variable first, contrary to function.

If you reveal more information (you can add photo if needed) it would make it easier to help you

Best regards

As you can see, the variables defined as inputs do not appear when calling the Function (FC)

Hello Enrico,

I understand the confusion, the FC_Alarm is not an function block, but a function, hence no previous declaration. They are not automatically declared like that (it requires no previous var declaration). There are a simple way to see the required input. Write the Function, and then open the parenthesis “(“ and you can see the required inputs, like that:

In this case, I would write something like: brsmemcmp(ADR(variable1), ADR(variable2), SIZEOF(variable1));

In your case, after FC_Alarm, if you write “(“, the similar dialog should appear.

3 Likes