Q&A: What is the difference between scripts and expressions with regards to SCADA?
Question by Kean: What is the difference between scripts and expressions with regards to SCADA?
Iv been given this question in a class work project (industrial control) and have not been able to find any answers. A basic answer or a link to a helpful site will be greatly appreciated.
Best answer:
Answer by Ecko
I am talking about general programming here, but I expect it will apply. There should be enough info here to work out the particular details yourself. Scripting in this case applies to devices, like modems, loggers, scada devices:
An expression is included in a statement like “send xyz + abc”. In some cases the statements are expressions – meaning they are the same thing.The expression is the part the statement operates on, so “abc + xyz” in this example. There are string expressions, logic expressions and arithmetic expressions. There may also be functions like log, sine, and other expressions such as send, listen, receive, read, get, input, output for handling readings with the device’s ports. Expressions are often included in a statement using brackets or other delimiters.
A script is the list of statements, so the actual user entered program, written in a scripting language, which simply means the specific text of the language for the device involved. The script may seem like a fragment of a program, used by the device to perform particular functions like read analogue channels 1,2,3 and convert then to units by multiplying by 12 and adding 3. Scripts may also be associated with events, like particular times, clock ticks, change in port input and so on.
The syntax of all this will be found in the user manual. Sometimes there is a PC based software to help with writing scripts, using a “fill in the form” approach. The link below shows a bit about a scripting language, though nothing to do with scada.
What do you think? Answer below!