Language Help

<< Click to Display Table of Contents >>

Navigation:  Modbus Universal MasterOPC Server > Description of the Mod_RSSim Simulator > Script Automation >

Language Help

Language Help

The script language is a variant of VB-Script, so the Visual basic language reference is a reasonable place to start, but can be highly misleading. Un-fortunately VBA is not heavily documented, although anyone who has written over 2000 lines of classic Visual Basic or tones of Excel VBA Macros will slip right into this. There are some fundamental differences, but do not worry, if I cannot compile your script, I do tell you roughly which line is illegal and why.

Warning: The scripting feature does not let you do whatever you please, it was never designed to let you run more than a few lines of code, communicate with external programs or code, or perform complex calculation nor manipulate large amounts of data. Hence it’s limited to things like the sample above, and if you can take the CPU hit, longer programs of a few thousand lines.

The scripting function does not support Java, Java is do-able, if someone wants to add the few lines of needed code and dialog options needed please feel free to ask for directions.

Subroutines/functions must be declared before an executable program.

A script is saved as a text file; a filename extension does not matter (may be txt, vb, vbs or any other).