Author Topic: bit level addressing  (Read 2886 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
bit level addressing
« on: December 01, 2014, 07:35:37 PM »
Hi Archie, can you explain the bit level addressing newly added to AHMI 3.86?  How do i go about utilizing it?  This sounds like its what I been looking for, thanks. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: bit level addressing
« Reply #1 on: December 02, 2014, 07:21:00 AM »
The Modbus and EthernetIPforCLX support bit level addressing on words by adding a period followed by bit number. For example in Modbus, you can use 40001.0 to control a BasicIndicator color.

The Modbus bit level is read only, which means you cannot change the bits with things like buttons.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: bit level addressing
« Reply #2 on: December 05, 2014, 12:03:47 PM »
Hey Archie, this works great except I found that it doesnt seem to work with more than the first 2 bits( 40001.0 and 40001.1).  Anything higher like 40001.2 and up returns an invalid bit address message.  Is there a way to be able to use this for all 16 bits of a register?  Ive been trying to create a status panel using the basic indicator and need to utilize all 16 bits, thanks. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: bit level addressing
« Reply #3 on: December 05, 2014, 01:05:20 PM »
What version are you using? Around version 3.85 there was a change to fix that problem

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: bit level addressing
« Reply #4 on: December 05, 2014, 01:28:43 PM »
Im using 3.86

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: bit level addressing
« Reply #5 on: December 05, 2014, 01:48:46 PM »
Try 3.87.  The modbus drivers have been going through a lot of changes in the past few revisions

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: bit level addressing
« Reply #6 on: December 05, 2014, 01:59:21 PM »
I found that 3.87 does correct this.  Next thing, how can i make the basic indicator blink? thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: bit level addressing
« Reply #7 on: December 05, 2014, 02:13:23 PM »
The only way to make a BasicIndicator blink is by switching the bit on and off in the PLC program.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: bit level addressing
« Reply #8 on: December 05, 2014, 05:35:05 PM »
OK, I am not connected to a PLC.  This is connected to a control panel for the device I am monitoring.  I understand this feature is built into the Modbus driver code and would'nt want to change that.  Could you share some code options If I were to use another method (ie. datasubscriber)to check the bit status to blink the indicator.  Thank you. 

BTW, awesome job on this feature, this was my biggest hurdle and I suspect alot of users will love it.  Thanks again.   

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: bit level addressing
« Reply #9 on: December 06, 2014, 08:37:16 PM »
OK, I am not connected to a PLC.  This is connected to a control panel for the device I am monitoring.  I understand this feature is built into the Modbus driver code and would'nt want to change that.  Could you share some code options If I were to use another method (ie. datasubscriber)to check the bit status to blink the indicator.
There is a round about way to do this:

- Add a BasicIndicator, but do not put anything in the PLCAddress properties
- Add a Timer and set the Interval to 500
- Double click the timer to get back to the code
Code: [Select]
BasicIndicator1.SelectColor2 = NOT BasicIndicator1.Value
- Go back to the form design view
- Add a DataSubscriber and set the PLCAddressValue to your address
- Double click the DataSubscriber to get back to the code
Code: [Select]
if DataSubscriber1.Value then
  Timer1.Enabled=True
else
  Timer1.Enabled=False;
  BasicIndicator1.SelectColor2=False
end if