Hello,
I have a routine that uses the ONCHANGE event to read variables from an Allen-Bradley PLC (CompactLogix) via the IO SERVERS ABLOGIX.
ONCHANGE "EWON_MD_Usure_Ctrl_CompteurDepart", "@MD_MAJ_ReadValues ()"
In the FUNCTION, I read a series of 4 variables (1 integer, 1 float and 2 string). In the PLC, the 4 variables are updated at the same time. My trigger is on the integer variable (EWON_MD_Usure_Ctrl_CompteurDepart).
FUNCTION MD_MAJ_ReadValues ()
PRINT EWON_MD_Usure_Ctrl_CompteurDepart @ // Integer
PRINT EWON_MD_Usure_Data_TypeUsure @ // String
PRINT EWON_MD_Usure_Data_EquipementNumero @ // String
PRINT EWON_MD_Usure_Data_Valeur @ / Float
ENDFN
Once in the routine started, the integer and float variables are up to date, but not the strings. I changed the trigger on the first string, it is now up to date, but the second doesn’t necessarily.
Is this normal?
Is there a way to ensure that all the variables are up to date before doing the processing?
Thank you
Christian