I had a question regarding scripting.
I am currently performing a lookup from a pre-populated list to get a variables guid, writing a new value to that guid id, then firing a sendEvent() that transmits Modbus.
I am noticing that it seems 50/50, or unreliable, as to whether or not the new value is transmitted over modbus, or the old value.
simplified ex script,
Code: Select all
void $Transmit New Modbus$ ()
{
int var_guid = 0;
double number = 0;
smRead(VariableIDs.Number_GUID, var_guid); //where Number_Guid is a pre-populated list lookup value defined as a global variable
smWrite(var_guid, number); // Write the number value to the PowerVision Variable
sendEvent(EventIDs.Transmit_Modbus); //This state machine is a simple one, all it does is fire a RefreshMappingGroup Action containing the PowerVision Variable.
sendEvent(EventIDs.Close_Keypad); // Close the keypad the user was using to enter the new setting value
}
Any advice as to how to handle something like this would be appreciated.