Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Archie

Pages: [1] 2 3 ... 348
1
There is a decent example project showing the MainMenu structure:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/

LargePressHMIonPanelPC

2
The MainMenu pattern is described here:

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

It docks a menu of form change buttons on one of the screen edges. It is also good for things that you want to always have running such as data logging or barcode scanning.

3
The MainMenuDesign pattern takes care of this. It is a form that stay open all the time. When it is closed, it closes everything.

4
Check the Task Manager to see how much CPU and memory AdvancedHMI uses. Generally .NET applications are very lightweight and efficient since they are compiled. I have not run anything on Win11, so I have not experience with it yet.

5
Open Discussion / Re: How to set a basic label to show float variable?
« on: March 20, 2025, 07:17:28 AM »
The Siemens driver was developed by another user, so I don't know much about how it handles different data types. You may have to find the original post on it to see if the developer can provide any help.

6
Open Discussion / Re: How to set a basic label to show float variable?
« on: March 20, 2025, 06:19:11 AM »
What driver are you using? The generic drivers such as Modbus must be explicitly told it is a float by using address modifiers.

The BasicLabel automatically knows how to show as a float value. You can format the value by using the NumericFormat property. For example, set NumericFormat to 0.0 for one decimal place.

7
What version of AdvancedHMI are you using?

Add a BasicLabel next to one of the PilotLights using the same address for PLCAddressValue in the BasicLabel to see what it shows as the value.

8
Support Questions / Re: minimum hold time 3 color pilot light
« on: March 17, 2025, 05:19:15 PM »
- Save the attached file
- In Solution Explorer, expand down AdvancedHMIControls
- Right click the \Controls folder and selected Add -> Existing Item
- Select the PilotLigjt3Color.cb file that was saved
- choose overwrite
- Rebuild Solution
- Add PilotLight3Color to the form
- Set MinHoldTime to 1000 (1 second)

9
Support Questions / Re: Relate Label and BasicIndicator Using Code
« on: March 11, 2025, 05:53:42 AM »
Make use of the Value changed events and the property values of the BasicIndicator:
Code: [Select]
    Private Sub BasicIndicator1_ValueSelectColor2Changed(sender As Object, e As EventArgs) Handles BasicIndicator1.ValueSelectColor2Changed
        If BasicIndicator1.SelectColor2 Then
            Label1.ForeColor = Color.Red
        Else
            Label1.ForeColor = Color.Green
        End If
    End Sub

10
Support Questions / Re: Priority tag/address
« on: March 10, 2025, 06:08:50 AM »
There is no limit. They all route through one common data link layer so it does not create port sharing issues.

11
Support Questions / Re: Priority tag/address
« on: March 09, 2025, 01:47:10 AM »
Add a second driver instance to the form, set the PollRateOverride to how fast you want it to update.
For the controls that display the faster data, set ComComponent property to the driver instance that with the faster PollRateOverride

12
Support Questions / Re: Possible threading issue.
« on: January 26, 2025, 05:09:56 PM »
That's interesting, I never seen it done that way. I tested it and it does work.

If you are using a DataSubscriber2, the callback routine should be synchronizing to the UI thread and not allow parallel execution of the callback routine. I would be interested in seeing a breakpoint put in the DataSubscriber2 code in the OnDataReturned routine to see if the m_SynchronizationContext is set to anything:
Code: [Select]
    Protected Overridable Sub OnDataReturned(ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        If m_synchronizationContext IsNot Nothing Then
            m_synchronizationContext.Post(AddressOf DataReturnedSync, e)
        Else
            RaiseEvent DataReturned(Me, e)
        End If
    End Sub

    '****************************************************************************
    '* This is required to sync the event back to the parent form's main thread
    '****************************************************************************
    'Dim drsd As EventHandler(Of MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs) = AddressOf DataReturnedSync
    Private Sub DataReturnedSync(ByVal e As Object)
        RaiseEvent DataReturned(Me, DirectCast(e, MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs))
    End Sub

13
Support Questions / Re: Possible threading issue.
« on: January 26, 2025, 02:09:37 AM »
I'm not following what you are doing here:
Code: [Select]
conveyorStatus.Full = e.Values(0) = True
It appears you are over-writing the result (e.values(0)) returned from the driver and always making it True no matter what the PLC value has.

14
Open Discussion / Re: Indicator
« on: January 24, 2025, 04:50:11 PM »
A BasicIndicator will give you 3 colors controlled by bits.

You can use a MessageDisplayByValue with a few property changes to get the effect you describe:

- Add a MessageDisplayByValue to the form
- Set AutoSize to False
- Resize
- In the Messages property, click the ellipses (square with 3 dots)
- Add Messages and only set the BackColor and Value properties for each message
- Set PLCAddressValue

To simulate in Design View, change the Value property to various values


15
Support Questions / Re: Monitor different tags with DataSubscriber2 help
« on: January 13, 2025, 03:44:40 PM »
First, any reason you are using a DataSubscriber instead of the PLCAddressSelectColor2 and PLCAddressSelectColor3 of the BasicIndicator?

If you need to use the DataSubscriber, a better way to do this is to set Color1 to Yellow and Color2 to Blue. Then in the DataSubscriber set SelectColor2 and SelectColor3 to switch between the colors.

But overall, it looks like your code should work. I would try a break point in the routine to see if the event is firing. If so, then step through the code.

Pages: [1] 2 3 ... 348