Hi, just wondering if I could get some advice when setting up function blocks (Currently using Siemens S7) using a STRUCT data format.
Say I was coding a FB for a valve with some Inputs and some Outputs for that valve. Is it best to combine all the Inputs and Outputs etc under the same STRUCT and add to the function block as a VAR_IN_OUT parameter (STRUCT declared as a VAR_IN_OUT)? Or do you create 2 STRUCTs, one for Inputs and one for Outputs and add as VAR_IN and VAR_OUT to the block call (STRUCT for inputs declared as a VAR_IN and STRUCT for outputs as a VAR_OUT). Is there any other better way to do this?. Hope the above makes sense.
Appreciate any help with this or pointing me to another thread if already discussed.
Thanks
Say I was coding a FB for a valve with some Inputs and some Outputs for that valve. Is it best to combine all the Inputs and Outputs etc under the same STRUCT and add to the function block as a VAR_IN_OUT parameter (STRUCT declared as a VAR_IN_OUT)? Or do you create 2 STRUCTs, one for Inputs and one for Outputs and add as VAR_IN and VAR_OUT to the block call (STRUCT for inputs declared as a VAR_IN and STRUCT for outputs as a VAR_OUT). Is there any other better way to do this?. Hope the above makes sense.
Appreciate any help with this or pointing me to another thread if already discussed.
Thanks