AdvancedHMI Software

General Category => Open Discussion => Topic started by: martinav on June 29, 2021, 12:15:19 PM

Title: Can I add a PLC modbus value to drive visibility?
Post by: martinav on June 29, 2021, 12:15:19 PM
I am wanting to have a switch to turn on 'development mode' which would make visible labels that contain the modbus values for some of my controls.  I was hoping to control this via a modbus bit, so I can control this in the PLC or on the HMI.  How can I add the PLC input parmeters to any control?  Is this possible?  Namely,  the PLCAddressVisible property.  I'm using OrientedTextLabel.  I suppose I would  need to make another that is named OrientedTextLabel_PLC or something??

Thanks,
Rod
Title: Re: Can I add a PLC modbus value to drive visibility?
Post by: Archie on June 29, 2021, 12:20:10 PM
See if this is any help:

https://www.advancedhmi.com/forum/index.php?topic=1338.msg7106#msg7106
Title: Re: Can I add a PLC modbus value to drive visibility?
Post by: martinav on June 29, 2021, 02:32:36 PM
@Archie,

I think its a long shot, but if the control has no region named PLC Related Properties, it is as simple as copying it out of another control and dropping it into the other control???  I'm guessing - no.

Update:

What's the harm in trying?  Well, I got 6 errors just adding the region as-is...

(https://www.advancedhmi.com/forum/index.php?action=dlattach;topic=2940.0;attach=5444;image)

Of course, I have no clue what to do with it.

Update again:

Well, I found another region, "Subscribing and PLC data receiving".  Now, I'm down to one error.

(https://www.advancedhmi.com/forum/index.php?action=dlattach;topic=2940.0;attach=5446;image)

Final Update:

Not knowing at all what I am doing, further messing made matters worse.  I stopped here.  Not sure what to do, except just to delete it and  bail on the idea.
Title: Re: Can I add a PLC modbus value to drive visibility?
Post by: Archie on June 29, 2021, 04:06:10 PM
It sounds like a base control and not an AdvancedHMI control. You will need to make a copy of something like DigitalPanelMeter.vb, rename the class and change the Inherit to the OrientedTextLabel
Title: Re: Can I add a PLC modbus value to drive visibility?
Post by: martinav on June 29, 2021, 05:14:26 PM
ok, YES!  A little wrestling, and I got it.  Thanks, Archie!
Title: Re:Can I add a PLC modbus value to drive visibility?
Post by: carrollleigh on November 19, 2021, 08:10:56 AM
Hi! How does everything work??
Title: Re:Can I add a PLC modbus value to drive visibility?
Post by: MajorFault on November 20, 2021, 11:12:53 AM
Hi! How does everything work??
Very carefully.  If you want/need help you will need to muster up specifics.