0% found this document useful (0 votes)
3 views

GridWorX Server - Using Data Manipulators via Call Method

This document provides a guide on using the Call Method command to execute data manipulators in GridWorX Server, particularly focusing on adding, deleting, and updating records in a database. It emphasizes the importance of parameter configuration and the implications of using AssetWorX tag counting mode, which affects how parameters are passed. Users are instructed on setting up data entry process points and managing parameter tags to ensure proper data manipulation without conflicts between multiple clients.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

GridWorX Server - Using Data Manipulators via Call Method

This document provides a guide on using the Call Method command to execute data manipulators in GridWorX Server, particularly focusing on adding, deleting, and updating records in a database. It emphasizes the importance of parameter configuration and the implications of using AssetWorX tag counting mode, which affects how parameters are passed. Users are instructed on setting up data entry process points and managing parameter tags to ensure proper data manipulation without conflicts between multiple clients.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

GridWorX Server – Using Data Manipulators via

Call Method

Application Note October 2020

Description: A guide to executing data manipulators using the more natural data entry experience. This property should NOT be set
on process points connected to actual equipment, as it may cause the
Call Method command. accidental write of partial values, which may damage equipment.
General Requirement: Familiarity with:
4. Add a button.
• Workbench 5. Set the button text to Add Customer.
• GridWorX Server (particularly data manipulators) 6. Configure the button's pick action to be the Call Method.
• Commanding 7. Under CommandParameters, type this into Name:
• GraphWorX64
• Microsoft SQL Server db:Northwind.AddCustomer\Execute

Note: If you are not running in AssetWorX tag counting mode, you
can browse for your data manipulator's Execute method. It can be
Introduction found under Data Connectivity > Databases > database type >
database name > Data Manipulators > manipulator name > Execute.
Data manipulators are ways to change your databases by
executing queries or stored procedures. They are configured in If you are running in AssetWorX tag counting mode, you must type
Workbench under Data Connectivity > Databases > connection the name in manually. The format is:
type > specific database. The sample GridWorX Server database
contains three data manipulators under the Northwind sample db:databaseName.manipulatorName\Execute

database: AddCustomer, DeleteCustomer, and


UpdateCustomer. 8. Next to Parameters, edit the collection.
9. Select Add to add one member.
Most data manipulators use parameters to customize the 10. Set the member's Value to {{localsim::CustID:String}}.
changes being made at runtime, allowing the user to perform 11. Make sure the ValueType is String.
data entry or choose a particular record to modify or delete. 12. Add a second member.
This document will instruct users on how to use the Call 13. Set the second member's Value to
Method command to execute a data manipulator with {{localsim::companyName:String}}.
parameters. This method is necessary on systems licensed 14. Make sure the second member's ValueType is also String.
using the AssetWorX tag counting mode (introduced in version
Note: The order of the members must match the order in which the
10.96.2 with the GENESIS64 Basic SCADA package). AssetWorX parameters were defined in Workbench for the data manipulator.
tag counting mode interferes with traditional ways of passing
parameters to the @@Execute tag.

Note: This technique also applies to Web Manipulators in the Web


Services provider.

Call Method Command


This section will provide an example of how to use the Call
Method command to execute a data manipulator and pass in
dynamic parameter values.
1. Open GraphWorX64.
2. Add a data entry process point connected to this
simulation variable: localsim::custID:String Figure 1 - Editing Call Method parameters
3. Create a second data entry process point using this
simulation variable: localsim::companyName:String 15. Select OK.
16. Go into Runtime.
Note: As an optional step, on both process points, set
17. Enter values into the two data entry process points.
DataEntryLostFocusWritesValue to True. This setting is only visible
in advanced mode. This setting lets the user write the value to the 18. Select the Add Customer button.
point without having to use the Enter or Tab keys and provides a

© 2020 ICONICS, Inc. Page 1 of 2 GridWorX Server - Using Data Manipulators via Call Method
GridWorX Server – Using Data Manipulators via
Call Method

Application Note October 2020

19. Use SQL Server Management Studio to view the These parameter tags are designed to provide convenient data
Customers table in the Northwind database and observe entry. To allow multiple clients to interact with the same data
that your values have been added to the table. manipulator at once, each client essentially has its own copy of
these tags. Values written by a user on Client A will not see or
be able to change the values being written by Client B.
Problem with Parameter Tags and Inline
Unfortunately, this separation of clients is not possible when
Parameters the parameter tags have to pass through AssetWorX. In this
case, AssetWorX becomes the client, and clients of the
Users familiar with using data manipulators are probably aware
AssetWorX asset properties will see the same value. This means
of parameter tags. Every data manipulator with parameters has
that the user at Client A can see and accidentally overwrite the
a Parameters folder in the data browser, and in this folder are
parameters that Client B is trying to use.
tags for each parameter.
The @@Execute tag supports inline parameters, but when
AssetWorX tag counting mode is enabled AssetWorX does not
allow runtime parameters on the Real-time tab of an asset
property, making it difficult to use parameters unless they are
hard-coded.

This is why using the Call Method command is the best way to
execute a data manipulator when using AssetWorX tag
counting (the tag counting method used in GENESIS64 Basic
SCADA).
Figure 2 - Parameter tags under AddCustomer data manipulator

© 2020 ICONICS, Inc. Page 2 of 2 GridWorX Server - Using Data Manipulators via Call Method

You might also like