Author Topic: specify the bit address within the property PLCAddressClick  (Read 4559 times)

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
specify the bit address within the property PLCAddressClick
« on: November 06, 2016, 09:59:08 AM »
Hello Guys, it's the first time I use advanceHMI.
Sorry for my bad english.

How can a writing pad the value of a single bit.
I can read the individual bits in the address by entering properties.
for example 414200.1
But if you want to write me error.
I tried both and
614200.1
6:14200.1
6:14200,1
In both cases me error.
Vorri write it with the subject "Pilotlight"
I hope you understand what I wrote.
Thank you
« Last Edit: November 06, 2016, 10:28:07 AM by automatizzando »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: specify the bit address within the property PLCAddressClick
« Reply #1 on: November 06, 2016, 10:07:28 AM »
In order for this to work your device must support Modbus function 22 (0x16) which is masked bit write. Otherwise it is only possible to write to normal bit addresses

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #2 on: November 06, 2016, 10:32:19 AM »
Thanks for the answer, but if my device supports the function 22 (0x16)
How do you spell the correct size?
With the evidence I have done, I give me back the incorrect format error.
Thank you

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: specify the bit address within the property PLCAddressClick
« Reply #3 on: November 06, 2016, 12:44:01 PM »
The addressing is like this:

40001.0
40001.1


If I remember correctly, you will also need the 3.99r driver patch 3 for function 22 to work correctly:

http://advancedhmi.com/forum/index.php?topic=1470.msg7900#msg7900

I do recommend testing with ModRSim because that software is known to implement function code 22.

DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
specify the bit address within the property PLCAddressClick
« Reply #4 on: November 06, 2016, 01:23:38 PM »
I recommend ModRSsim2 (Archie left out the second s) and the 2 on the end is a later version.
It supports Modbus Function Code 22 (Hex 16) for both Serial and Ethernet protocols.
It is available here: https://sourceforge.net/projects/modrssim2/
The original version of Mod_RSsim only supported the serial protocol and had a bug in its implementation of this function.
« Last Edit: November 06, 2016, 01:25:53 PM by DougLyons »

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #5 on: November 06, 2016, 05:38:00 PM »
I can not make it work.
The device responds to me with function code error.
Yet the manual it says it accepts the function (0x16)

I'm working with version "Advanced HMI 399r".
You must still update with the patch?

May I ask where you enter the value to be sent in the properties of "Pilotlight"? When I select the "OutputType = WriteValue"

Thanks again
« Last Edit: November 06, 2016, 05:48:26 PM by automatizzando »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: specify the bit address within the property PLCAddressClick
« Reply #6 on: November 06, 2016, 05:49:09 PM »
I can not make it work.
The device responds to me with function code error.
Yet the manual it says it accepts the function (0x16)
May I ask where you enter the value to be sent in the properties of "Pilotlight"? When I select the "OutputType = WriteValue"
Output type of WriteValue will try to write an integer.  You will need to use any of the other settings for it to set a bit. Did you get the patch installed?
« Last Edit: November 06, 2016, 06:32:53 PM by Archie »

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #7 on: November 07, 2016, 04:18:16 AM »
in which directory should be installed the patch!
thank you so much

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: specify the bit address within the property PLCAddressClick
« Reply #8 on: November 07, 2016, 06:29:12 AM »
After unzipping the patch file, place it in AdvancedHMIDrivers\support to replace the existing file.

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #9 on: November 07, 2016, 09:22:48 AM »
I'm sorry, but I can not make it work.
I also installed the patch, but not function.
Could you tell me where to write the value to be sent with the property OutputType = WriteValue?
For example if I want to send with the clik the value 2 as you do?
Excuse me, but the language creates problems in understanding.
Thank you

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: specify the bit address within the property PLCAddressClick
« Reply #10 on: November 07, 2016, 09:33:37 AM »
Use these property settings:

PLCAddressClick = 40001    (or any writable integer)
OutputType = WriteValue
ValueToWrite = 2

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #11 on: November 07, 2016, 10:13:55 AM »

but in the properties of "Pilotlight" I do not find "ValuetoWrite"

I find it only in"BasicButton"

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #12 on: November 07, 2016, 10:18:41 AM »
Archie,

I just tried using v3.99r with patch 3 and MOD RSSim2.

With several BasicButtons having different addresses and output types, I don't see any value change in the simulator.

Output types were: SetTrue, Toggle and WriteValue
Addresses were: 40011.1, 40011.14, 22:40011.1, 22:40011.14
ValueToWrite was set to 1.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #13 on: November 07, 2016, 10:36:36 AM »
My bad. It was version 1 of MOD RSSim that I was using.

Just tried version 2 and it was changing value.

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: specify the bit address within the property PLCAddressClick
« Reply #14 on: November 07, 2016, 10:48:33 AM »
I do not know how he funzionarti.
To me it does not work.
My starting address is 14200
BasicButton: 22:414200.10 get "address must be 4-11 digit"
BasicButton: 22:14200.10 I get "invalid address format"
Pilotlight 22:14200.10 get "write failed format of the input string incorrect"