Free AdvancedHMI has been Updated - Now with Ethernet/IP driver

Is it actually possible to use your application for logging purposes, ie. log the output to a MySQL database or even an Access database. I'm not a VB programmer at all, but if it was actually possible to log to a database then that will give me something to work towards!
Thanks
ps. or in the future are you planning to include that feature into AdvancedHMI at all?
A data logging component is actually on the list of things to do.

I've done several database applications using the communication drivers and writing VB code. Start by looking into creating a data source.

VB.NET is probably not the easiest for writing to a database using code, so if you PM me an email address I can send you some sample code.
 
Problem with writing to PLC

Hi Archie,
I've got a problem with the Ethernet driver that I don't with the DF1Com driver.

I've developed a touchscreen application that is running on Windows XP home, which controls and logs data for a metal loom machine (makes wire mesh).
The program requires the user to log in with their employee code and job number. This then allows them to operate the machine.
If the machine is idle for more than 60 seconds, the machine will switch to locked state, indicated by a pilot light, which then requires the operator to enter a stop reason via a form. Once entered the machine will go into "Machine Ready" state and begin the count up to 60 seconds.
When a lay strike is detected, the timer is reset and the counters increase by one.
In the PLC program (controlled by an ML1100), I am using N7:1 through to N7:10, which the plc uses as the data log integers so I can extract using the data log extract program.
See below for the layout of the screen with the two associated forms:

HMIScreen.jpg


LoginScreen.jpg


StopReason.jpg


My original program using the DF1com driver functioned perfectly, but now I have just installed four more of these screens but to be talking to the PLC via the ethernet driver. In my original program, I stole some code out of your ABDF1 program to allow me to write to the PLC using code behind a button.
During testing of the program with the ethernet driver, whenever the login form or the stop reason form is enacted, the program freezes. I have managed to narrow the problem code down to this section below.


When I disable this code the forms have no problem at all (they just can't write to the plc) so I just can't help thinking why the write code that worked for the DF1Com driver does not work for the ethernet driver.
Below is the code for the DF1Com and the Ethernet I used. Very little difference except I changed the driver reference:

Code:
Private Sub Login_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login_Button.Click
        If txtOperator.Text = "" Then
            MsgBox("Please enter an operator ID!", MsgBoxStyle.Critical, "Error!")

        ElseIf txtJobNumber.Text = "" Then
            MsgBox("Your Job Number is incorrect!", MsgBoxStyle.Critical, "Error!")
        ElseIf txtJobNumber.Text >= 32000 Then
            MsgBox("Your Job Number is incorrect!", MsgBoxStyle.Critical, "Error!")

        End If
        '**************************
        '* Write a single element
        '**************************
        Try
            '* Perform the write
            '* If its a string then write as string, otherwise write as single value
            If txtOperatorAddress.Text.IndexOf("ST") >= 0 Or txtOperatorAddress.Text.IndexOf("st") >= 0 Or txtOperatorAddress.Text.IndexOf("St") >= 0 Or txtOperatorAddress.Text.IndexOf("sT") >= 0 Then
                EthernetIPforSLCMicro1.WriteData("N7:2", txtOperator.Text)

            Else
                EthernetIPforSLCMicro1.WriteData("N7:2", CSng(txtOperator.Text))
            End If

            ResultError.Text = "Successful Write"

        Catch ex As Exception
            '* show any errors in status bar
            ResultError.Text = ex.Message
        End Try
        '**************************
        '* Write a single element
        '**************************
        Try
            '* Perform the write
            '* If its a string then write as string, otherwise write as single value
            If txtJobNumberAddress.Text.IndexOf("ST") >= 0 Or txtJobNumberAddress.Text.IndexOf("st") >= 0 Or txtJobNumberAddress.Text.IndexOf("St") >= 0 Or txtJobNumberAddress.Text.IndexOf("sT") >= 0 Then
                EthernetIPforSLCMicro1.WriteData("N7:3", txtJobNumber.Text)
            Else
                EthernetIPforSLCMicro1.WriteData("N7:3", CSng(txtJobNumber.Text))
            End If

            ResultError.Text = "Successful Write"
        Catch ex As Exception
            '* show any errors in status bar
            ResultError.Text = ex.Message
        End Try
        MainForm.Label2.Text = EthernetIPforSLCMicro1.ReadAny("N7:2")
        MainForm.Label4.Text = EthernetIPforSLCMicro1.ReadAny("N7:3")
        txtOperator.Text = ""
        txtJobNumber.Text = ""

    End Sub
Code:
Private Sub Login_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login_Button.Click
        If txtOperator.Text = "" Then
            MsgBox("Please enter an operator ID!", MsgBoxStyle.Critical, "Error!")

        ElseIf txtJobNumber.Text = "" Then
            MsgBox("Your Job Number is incorrect!", MsgBoxStyle.Critical, "Error!")
        ElseIf txtJobNumber.Text >= 32000 Then
            MsgBox("Your Job Number is incorrect!", MsgBoxStyle.Critical, "Error!")
        

        End If
        '**************************
        '* Write a single element
        '**************************
        Try
            '* Perform the write
            '* If its a string then write as string, otherwise write as single value
            If txtOperatorAddress.Text.IndexOf("ST") >= 0 Or txtOperatorAddress.Text.IndexOf("st") >= 0 Or txtOperatorAddress.Text.IndexOf("St") >= 0 Or txtOperatorAddress.Text.IndexOf("sT") >= 0 Then
                DF1Comm1.WriteData("N7:2", txtOperator.Text)

            Else
                DF1Comm1.WriteData("N7:2", CSng(txtOperator.Text))
            End If

            ResultError.Text = "Successful Write"

        Catch ex As Exception
            '* show any errors in status bar
            ResultError.Text = ex.Message
        End Try
        '**************************
        '* Write a single element
        '**************************
        Try
            '* Perform the write
            '* If its a string then write as string, otherwise write as single value
            If txtJobNumberAddress.Text.IndexOf("ST") >= 0 Or txtJobNumberAddress.Text.IndexOf("st") >= 0 Or txtJobNumberAddress.Text.IndexOf("St") >= 0 Or txtJobNumberAddress.Text.IndexOf("sT") >= 0 Then
                DF1Comm1.WriteData("N7:3", txtJobNumber.Text)
            Else
                DF1Comm1.WriteData("N7:3", CSng(txtJobNumber.Text))
            End If

            ResultError.Text = "Successful Write"

        Catch ex As Exception
            '* show any errors in status bar
            ResultError.Text = ex.Message
        End Try
        MainForm.Label2.Text = DF1Comm1.ReadAny("N7:2")
        MainForm.Label4.Text = DF1Comm1.ReadAny("N7:3")
        txtOperator.Text = ""
        txtJobNumber.Text = ""

    End Sub
Similar code is behind the click event of the "OK" button on the Stop Reason Form. Both forms freeze the HMI, both forms work fine when the code is disabled.

What gets me is that the forms freeze before you hit the button, not when you hit the login button.
Lastly, the buttons I have used are normal buttons from VS, not the basic button that comes with AdvancedHMI. Could this be the problem? It shouldn't be because it worked with the DF1Com driver.

I'm hoping you can help me resolve what the problem is, to me it seems logical but it's not working right. There may be a glaring error in the code that I just can't see!

Thanks in advance that you or anyone else put into helping on this!:geek:
 
FutureBox... Have you downloaded the latest code that was posted about a month ago? There was a problem with the Ethernet driver when it was used on multiple forms. It would drop communications and freeze for about 30 seconds until comms started again.

A quick way to find out if this is the problem is by deleting all but the one instance of the driver on the MainForm and referencing it like this in other forms:
Code:
MainForm.EthernetIPforSLCMicro1.WriteData("N7:2", txtOperator.Text)

I am assuming the name of your startup form is "MainForm". Otherwise use what you named the form ahead of the driver name.

This only works if you are not using AdvancedHMI visual controls on other forms.

If this is the problem, then it should be fixed on the latest release I posted.
 
Hello Archie,

I am now seeking a SCADA software for my pumping system. Could you please tell me AdvancedHMI can work with Koyo DL06 PLC or not?

Thanks
 
I am now seeking a SCADA software for my pumping system. Could you please tell me AdvancedHMI can work with Koyo DL06 PLC or not?
Currently there are no drivers for the Koyo PLCs, but they are on the list to have a driver developed.

I try to avoid the term SCADA in reference to the AdvancedHMI because the primary target of the software is to be an HMI talking to one PLC. Although it is possible to use it as a SCADA, it would require knowledge of VB.NET programming.
 
Currently there are no drivers for the Koyo PLCs, but they are on the list to have a driver developed.

I try to avoid the term SCADA in reference to the AdvancedHMI because the primary target of the software is to be an HMI talking to one PLC. Although it is possible to use it as a SCADA, it would require knowledge of VB.NET programming.

Thanks Archie, looking forward the new version with Koyo driver.
 
FutureBox... Have you downloaded the latest code that was posted about a month ago? There was a problem with the Ethernet driver when it was used on multiple forms. It would drop communications and freeze for about 30 seconds until comms started again.

A quick way to find out if this is the problem is by deleting all but the one instance of the driver on the MainForm and referencing it like this in other forms:
Code:
MainForm.EthernetIPforSLCMicro1.WriteData("N7:2", txtOperator.Text)
I am assuming the name of your startup form is "MainForm". Otherwise use what you named the form ahead of the driver name.

This only works if you are not using AdvancedHMI visual controls on other forms.

If this is the problem, then it should be fixed on the latest release I posted.

Hi Archie,
Thanks for your reply.
Yes I have downloaded the latest update of the HMI, last thursday I grabbed it.
I gather what you are telling me is that the EthernetIPforSLCMicro1 that I have on the Login Form and Stop Reason Form shouldn't be there? Only have it on the Main Form and if needed reference it directly?

I'll try that and update you on how it goes. I noticed in the properties for the EthernetIPforSLCMicro1 that there was a synch option, relating to the form. I figured that that would let the three drivers act as one like it does with the DF1com.

Won't be long and I update you shortly. Thank you.
 
Hi Archie,
Thanks for your reply.
Yes I have downloaded the latest update of the HMI, last thursday I grabbed it.
I gather what you are telling me is that the EthernetIPforSLCMicro1 that I have on the Login Form and Stop Reason Form shouldn't be there? Only have it on the Main Form and if needed reference it directly?

I'll try that and update you on how it goes. I noticed in the properties for the EthernetIPforSLCMicro1 that there was a synch option, relating to the form. I figured that that would let the three drivers act as one like it does with the DF1com.

Won't be long and I update you shortly. Thank you.
UPDATE: Deleted all EthernetIPforSLCMicro1 drivers except for the one on the main form, referenced the code to the driver on the mainform in the Stop Reason and Login Forms when needed for write and read functions.
RESULT: Worked like a dream!!!
Thanks Archie, you're a dream come true!!!!
 
Archie,

There is any developpment for the compactlogix family?

Actually I try to develop a short home application with a L32E PLC, but I can't find any example or support to communicate with the ethernet/ip port.

Thanks!
 
There is any developpment for the compactlogix family?

Actually I try to develop a short home application with a L32E PLC, but I can't find any example or support to communicate with the ethernet/ip port.
I though I was going to get a project this year that would require me to develop an Ethernet/IP driver for the Compact/ControlLogix family, but that didn't happen. I still want to write one, but without a project for it, it's hard to devote the time to it. It's a fairly complex protocol and will take about a week of time dedicated to it.
 
I though I was going to get a project this year that would require me to develop an Ethernet/IP driver for the Compact/ControlLogix family, but that didn't happen. I still want to write one, but without a project for it, it's hard to devote the time to it. It's a fairly complex protocol and will take about a week of time dedicated to it.


Hi Archie,

There is any complete documentation to explain the communication protocol, like omron does with Fins/Tcp ?

Regards
 
There is any complete documentation to explain the communication protocol, like omron does with Fins/Tcp ?
Unfortunately there seems to be no one single document that explains how to read data from a compactlogix. There is the document from ODVA that is very generic in describing CIP and Ethernet/IP. There are documents on the Rockwell website:

http://www.rockwellautomation.com/enabled/guides.html

And there are many other partial resources found on the web. You can find some details on Lyn Linse's web site. Most likely you will have to do some packet captures from RSLINX to fill in the gaps.
 
AlarmGrid control

I wasn't sure where to post this, sorry if this is the wrong place.

I'm a complete newcomer to PLCs and programming and I think AdvancedHMI is great - I've managed to get my HMI to communicate with the PLC through the Ethernet/IP driver and it was very easy. I've got some questions about the AlarmGrid control.

At present, my alarm grid allows the operator to delete a row, even if the alarm for that row is still energised. Is there a way to disable this? I'd also like to have a button that will clear any resolved alarms from the grid, and I'm not sure how to achieve this.

Thanks!
 
I've got some questions about the AlarmGrid control.

At present, my alarm grid allows the operator to delete a row, even if the alarm for that row is still energised. Is there a way to disable this? I'd also like to have a button that will clear any resolved alarms from the grid, and I'm not sure how to achieve this.
The short answer is Yes, there is a way to do it. But the long answer is Not so easy. The Alarm grid as it currently exists has very few features. To get it to do much more than show alarms, it will require adding code to the component.

AdvancedHMI comes with all the source code, so someone that can do VB programming can customize the components.
 

Similar Topics

Hi everyone, I'm in search of software for electrical drawings, preferably free but also interested in paid options. Any recommendations or...
Replies
33
Views
1,590
Hello, S7-200 is installed with dot matrix printer. its printer is not working. now I have changed the printer. Problem in new printer is that...
Replies
0
Views
210
We are to develop a first application in Codesys. It will contain motion (Softmotion) with drives on Ethercat (CSP mode). Off course there will be...
Replies
2
Views
918
Just started working with some HART loops and I'm trying out Pactware.I'm using Krohne and it works just fine recognizing my modem. I downloaded...
Replies
9
Views
1,372
Hi, There's a problem I face with upgrading the OS from XP which has the Step 7 Lite installed to windows 10. As I can't use a cracked version of...
Replies
2
Views
623
Back
Top Bottom