Creating your own script block:
1) Make sure your MPX controller device has a valid instance number (not -1)
This is especially important for offsite engineering and not connected to
live controllers. (Station running, controller created offline)
2) Drag Script Program object from palette into the Config folder of the
device
3) If smartxip driver license is valid and activated, the instance number of the script
object will change from -1 to the next number in the sequence. A popup in
the lower right hand corner will tell you it was successful.
4) Enter the script editor by right clicking on the object, then views, then MPX script editor
5) Write your code
6) Compile code
7) A Compilation document will be created and placed in your MPX_Script\Compiled folder.
A Source document will be created and placed in your MPX_Script\Source folder
😎 The saved file formats are:
"ScriptCompilation"_DeviceInstance#_ScriptInstance#.xml
"ScriptSource"_DeviceInstance#_ScriptInstance#.txt
This format will make the file names unique per controller and script.
9) Save script to station
10) Script block is good to go
Other items talked about:
1) Place the script program config object into the right place. The block can be legally
placed in many locations but only one location will work. (Config Folder). Everything
including the folder itself has the same icon picture.
2) If smartxip driver isn't activated, then every object placed into the
config folder will have a -1 instance number instead of incrementing by 1.
3) If you don't have a valid instance number in the device and/or script program object,
then the compiled XML and TXT document has a strong chance of not being unique
and can overwrite other scripts. A "-1" in the file name will be the problem. In worst case
scenario, the last script you worked on can overwrite every script and function in the
entire database.
ScriptCompilation_-1_-1.xml
ScriptSource_-1_-1.txt
4) There's 2 methods to manually change device instance number and 1 method to change
the script object instance number.
5) The Config icon picture being used for all the MPX objects integration is just the way it has to be
and can't do anything about it for the time being.
6) MPX Config folders are an item being thought about for future release.
7) The regular bacnet folder objects can be used to various degrees in the MPX bacnet
interface.
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!