- Posted on: 2022-02-21
The typical software architecture delivered by Synovus with most automated test systems includes the following components:
- Symplify core libraries (supervisor, datalogging, etc.)
- Instrument drivers as LabVIEW code
- User interface(s) such as operator interface and P&ID page as LabVIEW code
- Standard sequence of events for startup/shutdown as Symplify scripts
- Different test procedures as Symplify scripts
- Some simple logic and models as scripts
The general rule of thumb is that code that changes little during development and over the lifetime of the test stands should live as LabVIEW code. On the other hand, procedures, making decisions and computing equations affecting how the system behaves rather than what it can do are better implemented as scripts.
The scripts are much more flexible for customization when the system is already setup. Engineers can make adjustments to parameters, add or remove steps and tune delays and pass/fail criteria quickly when changes are required. It is easy to protect those files from regular users modifying them by mistakes.
Why not do everything as scripts?
Scripts are ideal for executing procedures and setting values or comparing readings from multiple drivers. Unlike LabVIEW code, they cannot efficiently communicate with instruments and handle software exceptions (LabVIEW Error Cluster) simply. LabVIEW code is much better at performing parallel processing with predictable execution rates.
Speeding the script execution up
The script engine inside Symplify interprets every line at runtime before executing that line. Because of this, it is significantly slower than native LabVIEW that is compiled into machine code. On a modern computer, one should expect that it takes less than 5ms to execute 1 line of the script (~200 lines per second.) By default, unless told otherwise Symplify script engine in version 2.x and 3.x go at 1 line per second. To modify this, simply add the following line at the beginning of your script:
- ExecutionTiming_ms = 50
This would tell the script engine to perform 20 lines per second (every 50ms). You could also do:
- ExecutionTiming_ms = 5
Synovus doesn’t recommend going faster even though you could technically set this variable to 1ms. The problem here is a possible impact on the CPU load. Users should therefore stay at 5ms or slower.
A very high performance alternative
Finally, if you have a need to run scripts rather than LabVIEW code … Symplify high-performance. The performance is roughly 100x better than our regular script engine. The drawback is that fewer operations are available and only numerical and boolean Tags can be used. String tags cannot be read from or written to within this version of the script engine and many functions have some limitations. You can ask for more details from our experts by using the Contact US form.