In some cases, you may need to handle the sending of operator messages to alarm areas in your own scripts. For example, a subroutine may not exist for the exact task that you want to perform. The following is an example of a specific case involving the WriteValue subroutine.
As stated in the previous section, subroutines handle the posting of operator messages to alarm areas for you. Therefore, the following script:
Writevalue "1", "sample"
will send out this message:
Fix32.ThisNode.sample.f_cv was set to 1.
However, this script will not generate an operator message:
Fix32.ThisNode.sample.f_cv=1
A separate subroutine, SendOperatorMessage, is provided for that purpose. Simply add a call to the SendOperatorMessage to generate the desired message.
WriteValue, ReadValue, SendOperatorMessage, and all other iFIX subroutines are described in more detail in the Subroutine Summary section of the iFIX Automation Interfaces Electronic Book.
The code within the global subroutines offers a wealth of information to the developer who is learning how to automate iFIX with VBA.
The global subroutines can be found in the FactoryGlobals VBA project. The FactoryGlobals file is write-protected to maintain the integrity of these scripts. For your convenience, you can view the content of the global subroutines module by clicking the following link: globalsubroutines.txt. This file contains all of the code exported from within these subroutines in a text file.
iFIX also provides several Experts to help you perform the most common functionality. Just as subroutines offer help to the seasoned VBA programmer, Experts can help developers who want to achieve similar results without having to write any VBA code at all. These Experts, which look like standard dialog boxes, actually generate VBA code for you, based on how you configured the options within the Expert. You can learn more about Experts in the Creating Pictures manual.