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 ... 346
1
Support Questions / Re: Display text
« on: November 20, 2024, 04:03:36 PM »
Are you still only seeing a "0" if you use the address 436865@S10 for PLCAddressValue in a BasicLabel ?

What character is in the data table for the first address?

2
Support Questions / Re: Display text
« on: November 17, 2024, 08:16:12 AM »
Modbus as a protocol doesn't support string natively, but there is a way to tell the driver to convert an array of values into a string by using an address modifier.

For example,

40001@S10


https://www.advancedhmi.com/forum/index.php?topic=2657.msg15970#msg15970

3
Open Discussion / Re: Control Logix array to Excel in 2024
« on: November 08, 2024, 02:19:32 PM »

4
Open Discussion / Re: All I want for this Christmas
« on: November 06, 2024, 02:27:16 PM »
Let's see what I can work up with my time over the holidays.

5
Open Discussion / Re: Control Logix array to Excel in 2024
« on: November 06, 2024, 02:26:07 PM »
There will be a need for some basic coding to transfer from your PLC to a spreadsheet. AdvancedHMI is the tool that makes it easy to get the data from the PLC. To get the data into a spreadsheet, you will need a tool for that. In the past, I would always recommend EPPlus as the tool. For new projects, I now suggest ClosedXML. That library is free and can be added to your project using Nuget.

Here is a simple demo of using ClosedXML:

1) After opening AdvancedHMI is Visual Studio, in Solution Explorer, click once on the AdvancedHMI project to make it the current selection
2) Go to Project -> Manage Nuget packages
3) At the top of the NUget windows, click Browse (Next to installed)
4) In the search bar, enter "ClosedXML"
5) ClosedXML should be the first item in the list, click once to highlight it.
6) To the right, click the install button
7) Accept the project additions and licenses

This will now have ClosedXML added to your project

Now let's put it to use:

1) In Solution Explorer, double click MainForm to open the designer
2) In a blank area on the MainForm, double click to get back to the code
3) Enter this code:
Code: [Select]
        Dim WB As New ClosedXML.Excel.XLWorkbook()
        WB.AddWorksheet()

        WB.Worksheets(0).Cell("A2").Value = "New Value"
        WB.SaveAs(".\ExcelFile2.xlsx")
4) Run the application, after it starts up then close it

At this point you now have created a Worksheet and added a value to cell A2.

1) In Solution Explorer, right click the AdvancedHMI project and select Open Folder in File Explorer
2) Browse to \bin\Debug
3) You should see the newly created file of ExcelFile2.xlsx

I will follow up later with another post on how to get data from your PLC

6
If I understand correctly, you can create properties in the User Control that expose the properties of the contained components.
[/code]
    Public Property PilotLightComComponent As MfgControl.AdvancedHMI.Drivers.IComComponent
        Get
            Return PilotLight3Color1.ComComponent
        End Get
        Set(value As IComComponent)
            PilotLight3Color1.ComComponent = value
        End Set
    End Property
Code: [Select]

7
Support Questions / Re: Extending BasicTrendChart to trend BOOLs
« on: October 09, 2024, 07:17:47 PM »
I would probably make the base control handle "True" or "False" like this:

Code: [Select]
    Public Property Value As String
        Get
            Return ""
        End Get
        Set(value As String)
            Try
                If Not String.IsNullOrEmpty(value) Then
                    If String.Compare(value, "True", True) = 0 Then
                        m_Points.Add(1)
                    ElseIf String.Compare(value, "False", True) = 0 Then
                        m_Points.Add(0)
                    Else
                        m_Points.Add(CSng(value))
                    End If
                End If
            Catch ex As Exception
            End Try
        End Set
    End Property

You can make a copy of the BasicChart and rename it to BasicChart2, then change BasicTrendChart to Inherit BasicChart2

8
Support Questions / Re: Extending BasicTrendChart to trend BOOLs
« on: October 09, 2024, 06:29:27 PM »
The BasicChart is only a Windows control without any connection to the PLC.

The BasicTrendChart inherits the BasicChart and adds the "AdvancedHMI" parts to it so it can connect to the PLC.

9
Support Questions / Re: Extending BasicTrendChart to trend BOOLs
« on: October 09, 2024, 12:32:57 PM »
The BasicTrendChart is a very bare bones control which makes it very fast, but lacking in features.

Attached is the underlying control if you wanted to give a go at modifying it for boolean values.

10
Support Questions / Re: Extending BasicTrendChart to trend BOOLs
« on: October 09, 2024, 11:05:36 AM »
Is there a reason you want to use the BasicTrendChart and not something a bit more advanced like the ChartWithLogging?

11
What is the PollRateOverride for the Modbus driver?

You could try adding a new driver instance that is dedicated to the DataLogger2. Set the PollRateOverride to 1000. In The DataLogger, Set ComComponent to the new driver instance and set the LogTriggerType of the data logger to EverySample.

12
Support Questions / Re: WAGO 750-891 Reading Address Issue
« on: September 24, 2024, 08:37:20 AM »
40002 should read the address %IW2

Each Modbus 4000 series address reads 2 bytes. The Wago address space is per byte. So 40001 will span %IB0 and %IB1 (aka %IW0). Then address 40001 will span %IB2 and %IB3 (%IW2)

13
Support Questions / Re: WAGO 750-891 Reading Address Issue
« on: September 24, 2024, 07:57:55 AM »
10001 is going to be a boolean value. Start with testing address 40001

I was looking at the manual found here in the download section:

https://www.wago.com/us/controllers-bus-couplers-i-o/controller-modbus-tcp/p/750-891#:~:text=Both%20interfaces%20support%20autonegotiation%20and%20Auto-MDI(X).%3C/p%3E%3Cp%3EThe

The Product manual in section 12.2.4 it defines the address, but refers to them as the function codes. This is what is highly confusing about Modbus. AdvancedHMI uses Modicon style addressing which uses the first digit to translate into function codes.

The Address section of this page helps break down the conversion:

https://advancedhmi.com/documentation/index.php/ModbusRTUCom

A quick example would be reading %MW0. The manual says this is FC3 at 12288. In Modicon address that would be 412289  (Modicon starts with 1, therefore the offset)

14
Support Questions / Re: WAGO 750-891 Reading Address Issue
« on: September 24, 2024, 07:42:49 AM »
Are you using the ModbusTCP driver in AdvancedHMI?

15
Open Discussion / Re: AHMI with Profibus dp
« on: September 22, 2024, 07:36:12 PM »
I don't know the Siemens protocols very well.

Could the Snap7 driver that was adapted for use with AHMI be used for Profibus DP?

https://www.advancedhmi.com/forum/index.php?topic=2722.msg18207#msg18207

Pages: [1] 2 3 ... 346