I have a situation that I am trying to understand to see if this actually can be done. I have a FactoryTalk View application with a Numeric input that is scaled from -0.5 to 0.5 but it is writing directly to the Kepware Tag and is linked to a Modicon Register. I am not scaling the -0.5 to 0.5 in the hmi, I would like Kepware to perform that. So Ftalk input would be -0.5 to 0.5 and then Kepware would scale the -0.5 to 0.5 to 0 - 4095 and write 0 - 4095 to the Modicon PLC. Can this be done?
Hi,
Yes, this absolutely can be done in Kepware — and it's the right way to do it when you want to keep your HMI logic clean and offload the scaling to the OPC layer.
Kepware has a feature called Linear Scaling built into its Tag Configuration, which allows you to scale the raw PLC values (in your case 0–4095
) to engineering values (e.g., -0.5 to 0.5
and vice versa.
Here's how you can set it up:
Browse or manually add the tag pointing to the correct Modicon register (e.g., 400001
or %MW1
, etc.).
In the tag configuration:
Right-click the tag → Properties → Select the Scaling tab.
Check Enable Linear Scaling.
Scaled (Engineering) Range:
Low: -0.5
High: 0.5
Raw (Device) Range:
Low: 0
High: 4095
Verify that Scaling applies to both read and write operations.
This ensures that when FactoryTalk writes -0.5
, Kepware scales and sends 0
to PLC.
When PLC returns 2048
Kepware scales it back to 0.0
for FactoryTalk.
Ensure your Numeric Input object in FactoryTalk is bound to this OPC tag.
FactoryTalk will see only -0.5 to 0.5
, unaware of the underlying 12-bit raw range.
Ensure the tag datatype is INT
or WORD
(Modicon register type) that can handle 0–4095
properly.
Double-check that Modicon doesn’t expect any special format (e.g., signed, BCD).
If writing fails or scales incorrectly, try adjusting the tag’s data format (e.g., Unsigned Word vs Signed Word).
Thanks,