A meta point script cannot write a numeric value directly to a Modbus point with .set(). Use a point link to transfer the meta point value, or move the write into a scripting data source and call set() on the configured variable.
Why the Meta Point Write Fails
Meta point scripts do not provide the .set() function available in a scripting data source. Therefore, calling that function from the meta point is not a supported write path.
Select the Modbus Write Method
| Method | Use | Write mechanism |
|---|---|---|
| Point link | Keep the calculated value in the meta point | Link the meta point to the Modbus point |
| Scripting data source | Issue the value directly from a script | Call set() on the configured variable |
The evidence does not identify a manufacturer, register address, Modbus data type, or value encoding. Retain the existing Modbus point configuration instead of assuming those details.
Configure and Verify the Write
- Choose a point link if the meta point already produces the required numeric value; set the meta point as the source and the Modbus point as the destination.
- Otherwise, configure a scripting data source and write through its configured variable:
varName.set( 12.34 );
Replace varName with the variable assigned to the intended point. Run the selected path and verify that the destination Modbus point reflects the commanded value. If it does not, first confirm that the write is executing in a scripting data source or through a point link rather than attempting .set() inside the meta point script.
FAQ
Can a meta point script call .set() on a Modbus point?
No. Meta point scripts do not have the .set() function; use a point link or a scripting data source.
How do I write a numeric value from a script to a Modbus point?
Configure the write in a scripting data source and call varName.set( 12.34 );, replacing varName with the configured point variable.
How can I send a meta point value to a Modbus point?
Create a point link from the meta point to the Modbus point, then verify that the destination point reflects the calculated value.