800xA Scripting documentation
I would like to ask where I can find more information about scripting in VB in 800xA.
For example I am looking for documentation of function setPropertyValue().
Example of this function:
"Control Module", _
How do I know 2nd parameter of this function?
Voted best answer
The scripting aspect system is not documented since it is not an openly supported function of System 800xA.
With scripting you have access to more or less everything inside the 800xA system and you can do a lot of harm by implementing bad scripts. In BEST case the workplace crashes or freeze up.
The workplace does not contain any tools to debug a script - hence programming scripts requires a LOT of knowledge about what is considered proper coding technique inside System 800xA.
I will share a few things with you:
1) Avoid nasty lockups due to alarm hook interface on the regular Scripting Verb, therefore go directly for the Simple Scripting Aspect.
2) A description to the parameter to the setPropertyValue() function can be found by looking its declaration a bit down in the script code (if you as me copied the scripting aspect from some system default object type, e.g. the MB300 AO object type from 800xA for Advant Master).
3) The ID for any aspect category can be found in the Aspect System Structure.
Below an example for where I have made a script that writes to a property at AC800 Connect's "Control Module" aspect (which seems like what you are trying to do as well):
And as I wrote, be careful with your scripting...
I have copied some scripts from advant and I have changed it a little bit to work with AC800M and it works but there is one small problem. I see setSeq and setTest takes affect only when control module is locked by me so it does not make any sense...
Do you have any tip on that?
Please find below example of one function with my changes:
' Reset the property IntPar.SetSeq on the aspect Control Module
success = setPropertyValue( _
"Control Module", _
Lock can be taken via OPC DA by writing to Lock Global Properties:ControlLockCommand, I think 1 or -1 is take lock and 0 is release lock.