Author Topic: basic label that reads strings  (Read 2638 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
basic label that reads strings
« on: May 17, 2018, 10:23:53 PM »
Is it possible to to modify the basic label to read strings from modbus thru the property settings?  I know that I can write the code to do this but was wondering if it can be a default function where i can enter the starting register and number of consecutive reads and whamo, the string displays in the basiclabel text.  I ask because i plan to use a bunch of them and want to avoid writing  the code.  Thanks. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: basic label that reads strings
« Reply #1 on: May 17, 2018, 11:06:36 PM »
The latest beta version of 3.99y supports strings in the Modbus driver. The address modifiers have been changed to accommodate this. You can now use an address like 40001@S10 to read 10 bytes starting at 40001 and it returns the result in the format of a string. So you can put that address in the BasicLabel's property of PLCAddressValue.


You can get the beta version from here:

https://www.advancedhmi.com/forum/index.php?topic=2058.0

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: basic label that reads strings
« Reply #2 on: May 18, 2018, 07:56:11 AM »
That's awesome Archie!  What is the easiest way to upgrade from 3.99x?  Thank you.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: basic label that reads strings
« Reply #3 on: May 19, 2018, 10:21:56 AM »
Archie, I started migrating my project from 3.99x to 3.99y by adding the .vb files as existing items.  Everything went well until I got these errors.  There are a bunch more than shown.  What I noticed is all my AHMI components are now missing.  I have the drivers but no controls.  I shut VS and restarted but no luck.  How do I proceed?  Thank you 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: basic label that reads strings
« Reply #4 on: May 19, 2018, 12:39:34 PM »
To do an upgrade:

- Download and extract the latest version
- Open the latest in Visual Studio
- In Solution Explorer right click the AdvancedHMI project and select Add->Existing Item
- Browse to your old solution
- Select one of the *.vb files that corresponds to each form (e.g. MainForm.vb)  Only select 1 at a time and repeat for each form otherwise it will not pull the associated files in with it

- Once all of the forms are imported to the new version, Build the solution
- You may get a few errors in places where property names have changed. Double click each error and manually correct

Phrog30

  • Guest
Re: basic label that reads strings
« Reply #5 on: May 19, 2018, 03:28:57 PM »
I recommend putting everything unique to you in a separate folder.  It makes upgrading A LOT easier.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: basic label that reads strings
« Reply #6 on: May 20, 2018, 07:39:17 PM »
I worked thru this.  I had followed the steps you outlined but I think the issue came about when I deleted your mainform to add my mainform.  The entire .dll file for the drivers was missing.  I copied the .dll file from a fresh copy and it cleared most of my errors.  BTW, the Modbus string read feature works like a champ in the latest version.  Thank you.