I'm working on a project with RightWON Configuration Suite. I use structured text to code and create functions (UDFB). My problem is that when I start the simulation, I get an error message telling me that there are inputs expected on the line where my function is called.
Here are my variables:
Here is the main code:
nombre_power_source_on := 1;
gd1_synchro := FALSE;
gd2_synchro := FALSE;
mgset_synchro := FALSE;
result := MasterSlaveFunction(nombre_power_source_on, gd1_synchro, gd2_synchro, mgset_synchro);
gd1_sm := result.gd1_sm;
gd2_sm := result.gd2_sm;
mgset_sm := result.mgset_sm;
Here is the MasterSlaveFunction function:
IF nombre_power_source_on <= 1 THEN
gd1_sm := 1;
gd2_sm := 1;
mgset_sm := 1;
ELSE
IF gd1_synchro = TRUE THEN
gd2_sm := 0;
mgset_sm := 0;
ELSIF gd2_synchro = TRUE THEN
gd1_sm := 0;
mgset_sm := 0;
ELSIF mgset_synchro = TRUE THEN
gd1_sm := 0;
gd2_sm := 0;
END_IF;
END_IF;
And here are the inputs and outputs of the function: