
Originally Posted by
rEegLer
Also, where is the timer interval defined? Is it internal? I know I cab define the timer interval in the cs code you supplied but just replacing the parameter "how_often_in_milliseconds" with a numeric value but just wondering where that parameter is.
That parameter is in the xml file in this section:
Code:
<startup action="FuseGL.ExecuteCode" inputArgs="Logic/doOnAnalogue.cs;FuseGL_doOnAnalogue.ShowMessageBoxWithValue;RegisterAnalogueInput;{FB.AnalogueInput(0.1)};{(int)10000};" />
you can see the inputArgs string has a lot of semicolon separated variables, but at the end of it shows the {} enclosed variables. The first variable is the AnalogueInput port[1] on FB[0] ({FB.AnalogueInput(0.1)}) and the second is an integer of 10 seconds ({(int)10000}). If you left off the "int" part, you have no guarantee it will be an integer, it may be cast as a double or float which will not allow the code to work because it is specific that a int must be used in the method arguments.
Bookmarks