cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Writing from FactoryTalk HMI Numeric Inout through Kepware to Modicon PLC (Scaling for write)

TS_12889420
2-Explorer

Writing from FactoryTalk HMI Numeric Inout through Kepware to Modicon PLC (Scaling for write)

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?

1 REPLY 1

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.5and vice versa.

 

Here's how you can set it up:

1. Create the Tag in Kepware

  • Browse or manually add the tag pointing to the correct Modicon register (e.g., 400001 or %MW1, etc.).

2. Enable Linear Scaling

In the tag configuration:

  • Right-click the tag → Properties → Select the Scaling tab.

  • Check Enable Linear Scaling.

3. Set Engineering Unit Range

  • Scaled (Engineering) Range:

    • Low: -0.5

    • High: 0.5

4. Set Raw PLC Range

  • Raw (Device) Range:

    • Low: 0

    • High: 4095

5. Direction of Scaling

  • 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 2048Kepware scales it back to 0.0 for FactoryTalk.

6. Bind this tag to your FactoryTalk HMI input

  • 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.

Important Considerations:

  • 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,

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.
Announcements


Top Tags