AdvancedHMI Software

General Category => Feature Request => Topic started by: RedBinary on March 13, 2013, 09:57:57 AM

Title: Component event hooks
Post by: RedBinary on March 13, 2013, 09:57:57 AM
I'd like to see the basic components have built in public event hooks. I'm currently using a timer to poll the state of a PLC tag that is also used in an indicator. I'm using a state change to drive a large read so that it doesn't poll continuously. Eventually (when I read up on VB coding events) I'll write events into it, but I think it'd be handy to have these "out of the box".

As an example of my current case: BasicIndicator1 could have events for option2On, option2Off, option3On, and option3Off.
Title: Re: Component event hooks
Post by: RedBinary on March 14, 2013, 01:08:50 PM
Well I took about 10 minutes to both read up on event handling in VB as well as add "Event Option2ChangeState(ByVal state As String)" & "RaiseEvent Option2ChangeState(Values(0))" to BasicIndicator.vb so I suppose I jumped the gun making this a feature request!
Title: Re: Component event hooks
Post by: Archie on March 14, 2013, 02:45:26 PM
A trick that is used often is to add a BasicLabel and an event handler for TextChanged. In the event handler, you can read a large chunk of data. That keeps communications way down by only monitoring the one value.
Title: Re: Component event hooks
Post by: kaiyara on June 24, 2013, 01:24:44 AM
If you are communicating with more than one PLC, you will need to add a driver instance to the form for each PLC and give each one the IP address of the corresponding PLC. Then in the visual control, set the CommComponent property to which driver instance to use.