Writing binary values from HMI to PLC

Writing binary values from HMI to PLC https://forum.weintekusa.com/uploads/db0776/original/2X/6/6fa174da6dd0377cf303167029605f784c9f48cb.png
none 0.0 0
  • HMI Model: MT8072iP
  • EasyBuilder Pro Version: latest

Another beginners question…

I want to use a HMI switch (eg toggle, multistate) to provide PLC binary input. Attached screen-snip shows the toggle switch pop-up.

As shown, I have linked to a specific PLC tag and selected “present value ID#85” which implies HMI will read the Binary Value.

I dont understand how to define whether it is read or write. In this case I want the HMI to write to the PLC, so do I need to select a different BACnet property for writing? Which? Event Enable?

I would appreciate your assistance.

Hi @BrianF_NZ ,

The memory address associated with the toggle switch allows both reading from and writing to that address through the toggle switch. If you want separate memory addresses for read and write within the toggle switch, please select the “Read/Write use different addresses” box. Each object within EB Pro lets you know whether it is a read, write, or read/write object in the General tab.

As for the PLC, please ensure the settings allow for reading values from the HMI

Thank you.

When I set up a toggle switch linked to the PLC binary value I want to write-to, it seems counter-intuitive to select property #85 Present value if I want to write not read.

Should I select a different BACnet property or service?

I’m not all that familiar with BACnet, but in the Modbus world there are different function codes for write (05) and read (01). I would expect that BACnet would also require different codes to perform a write compared to a read?

Hi @BrianF_NZ ,

BACnet is a little different from MODBUS. Each BACnet tag is a complex object with multiple properties that can read and written into.

The “Present_Value” property is the correct tag to reference when having an object to write or read into it.

It’s the built in property with the BACnet protocol to display the current value of an object.

Thank you, and please let us know if you have any questions.

Thank you for confirming the BACnet property. selection.

I now have this working properly.

Among other things, I had set the Toggle Switch Attribute to “Set ON” instead of “Toggle”.
I dont understand what Set-ON and Set-OFF are for - since that locks the switch in one position??

Hi @BrianF_NZ ,

Glad to hear you have your project working.

The set on and set off feature, it’s common to share the same memory address across multiple objects, for example, a Toggle on the main screen and a separate “Off/Reset” somewhere else, or have the PLC auto-reset the bit after it sees a “Set ON” command. If you ever need separate read vs write points, you can also turn on “Read/Write use different addresses.”

1 Like