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 - lnw32

Pages: [1]
1
Yes, that looks like it is working.

Thanks,

2

I setup a simple HMI to experiment with the DataSubscriber2 and I think I might have found a bug.

I downloaded the latest version v3.99x and added a rich text box an EthernetIPforSLCMicroCom and a DataSubscriber2. I put in the IP address of our micrologix 1400 into the com. I put in 2 plc addresses into the data subscriber. I printed out the return value to the text box.

Code: [Select]

Private Sub DataSubscriber21_DataChanged(sender As Object, e As PlcComEventArgs) Handles DataSubscriber21.DataChanged
        RichTextBox1.Text += e.PlcAddress + ", " + e.Values(0) + vbCrLf
 End Sub

The issue I have is that the data appears to become corrupted. Instead of just reading the state of the bit, true or false, the value starts continuously reading and some of the data is wrong. If I subscribe to only one address the value is correct and only updates when the data changes. When I subscribe to 2 items they show up as always changing, even though they are not. It continuously updates. Here is a sample.

I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
...

Additionally, it is probably worth noting that the other controls on the screen (I added a button) also will start to toggle on and off, if it is assigned the same address as one that is in the data subscriber. I do not see this actually happening in the PLC.

I tried changing Framework versions and I don't see any effect.

I tried this same exact setup on an older version of the AdvancedHMI (v3.99a) I found in some downloads and the code worked as expected with multiple addresses.

Thanks, AdvancedHMI is great!

3
Support Questions / Re: Communications and Simulation Mode
« on: November 07, 2013, 09:14:30 AM »
Hi Archie,

Worked Like a champ!!

I Disable subscriptions by default now and only enable them after I find (ping) the address of the PLC. The HMI no longer becomes sluggish. I still get one error in VS

Below is what I did to your code. By the way I didn't see an entry for the ML1400 I'm using so I just did a message box and display what the return value was and then forced it. I also kept the commented code in my machine but left it out here for clarity.


    Public Function GetProcessorType() As Integer
        If m_ProcessorType <> 0 Then
            Return m_ProcessorType
        Else
           
            Return 159 ' Value that was returned when connected to ML1400
     
        End If
   End Function

Thanks,

Larry

4
Support Questions / Re: Communications and Simulation Mode
« on: November 07, 2013, 07:27:41 AM »
Thanks,

5
Support Questions / Re: Communications and Simulation Mode
« on: November 06, 2013, 03:51:11 PM »
Hi Archie,

This is NOT something I absolutely need since my code won't normally run without being connected to a PLC.

Following makulais question and your replay I have tried to allow my HMI to run without being connected. I tried to use the disable subscriptions and I still get errors. It's as if I didn't issue the command at all. The HMI will be unresponsive and when I close I have to use the "environment.exit" or use task manager to end the process.

However, when I connect to the PLC and start the software, the disable subscriptions works.

6
Support Questions / Re: Communications and Simulation Mode
« on: November 06, 2013, 09:51:56 AM »
HI Archie, Thanks for the fast reply. I don't see the event. I do see events, just not that one. I'm using version 3.59. I took a snippet of the listed events but I don't know how to include an image so I'll just list them. ConnectionEstablished, DataReceived, DownloadProgress, UnsolictedMessageReceived, UploadProgress. I don't know if this makes a difference but I'm using vs2013RC. I'm about to upgrade to vs2013RTM. Windows 7 Professional 32bit.

7
Support Questions / Re: Communications and Simulation Mode
« on: November 06, 2013, 09:10:55 AM »
You may be able to handle the ComError event and if there is an error then set the DisableSubscriptions to true. That will only work if you are using the built in controls. If you are reading/writing using code, then you will have to modify your code to stop reading when there is a com error.

Where do I find the ComError event?

I'm using EthernetIPforPLCSLCMicroCom1

Pages: [1]