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

Pages: [1]
1
Support Questions / Re: BasicLabels not being updated
« on: October 06, 2016, 01:53:23 PM »
Yes, it is from October 6th, 2016

2
Support Questions / Re: BasicLabels not being updated
« on: October 06, 2016, 11:26:30 AM »
Hey Archie, All 5 labels are now being read! Thanks!

When I added the file to the support folder it didn't ask to replace an existing file, thought you'd want to know.

Thanks again,
Alan

3
Support Questions / Re: BasicLabels not being updated
« on: October 06, 2016, 09:45:20 AM »
Hi Archie,

I just wondered if you had a chance to look more into this? Thanks again.

Alan

4
Support Questions / Re: BasicLabels not being updated
« on: October 03, 2016, 10:27:46 AM »
Allen-Bradley Micrologix 1100

5
Support Questions / Re: BasicLabels not being updated
« on: October 03, 2016, 09:49:05 AM »
I added 2 labels, with addresses ST20:0 and ST20:1 - They both worked fine and update immediately. I then add a 3rd label, ST20:2 and none of the labels update.

I let it just sit and run for a few minutes and I get ST20:0 to update with the message: Value was either too large or too small for an unsigned byte.

6
Support Questions / Re: BasicLabels not being updated
« on: September 30, 2016, 03:36:24 PM »
Hi Archie,

It seems like it depends on the combination of addresses used. Here are some of the results of my trials:

2 or more labels: Same address in each label: always works
2 labels: addresses N7:0 and  N7:1: works
2 labels: addresses ST20:0 and ST20:1: NOT Working

I tried 5 consecutive labels N7:0 to N7:5 and had great results.
I tried ST20:0, ST20:1, ST20:2, ST20:18, ST20:19 and nothing updates.

When I use the same addresses in the beta version it works fine.

The other thing is when I capture the data with wireshark I easily see data when it's working as you can see by my good capture attached. When I'm using labels with addresses that aren't working there is little to no data to capture. One last thing, if I place the addresses I need data for into the labels they all work by themselves, for example, I place ST:20:0 in all 5 labels they all update with the same data. Next, I place ST20:1 in all 5 and it works, and so on.

7
Support Questions / Re: BasicLabels not being updated
« on: September 30, 2016, 12:57:55 PM »
Hi Archie, Once again thank you greatly for your help!

I found the code and commented it out. The code wasn't in AdvancedHMIv399p but was in in the AdvancedHMIv399r. If I add more than one label it doesn't update so I'm not sure the removal had anything to do with it because I've had 5 labels installed the whole time.

To recap: Using AdvancedHMIv399r, I commented out the code you suggested but it doesn't matter, as soon as I add more than 1 label I get no updates on either one.

Here are 2 captures, filtered on the build computer as source the other using plc as source.

8
Support Questions / Re: BasicLabels not being updated
« on: September 29, 2016, 12:36:30 PM »
In the PLCAddressValue, for the first BasicLabel I have set up is ST20:18. I do not get a message box pop up, also I've attached another wireshark capture.

I did notice if I leave the application running for a while one of the BasicLabel's text changed to Value was either too large or to small for an unsigned byte, it has a PLCAddressvalue of ST20:0.

9
Support Questions / Re: BasicLabels not being updated
« on: September 29, 2016, 09:39:19 AM »
Hi Archie,

The DisableSubscriptions property of the driver is set to False. Here is a wireshark run after adding the code to the form as you requested. Thank you for your assistance!

I just noticed that inserting the code changed the title bar from reading AdvancedHMI v3.99r to now reading the number 3 !

10
Support Questions / Re: BasicLabels not being updated
« on: September 28, 2016, 03:45:42 PM »
Ok, trying to figure out how to use wireshark and haven't quite got it yet but it looks like the session in the working program was registered as a success. I attached the 2 packet captures.

11
Support Questions / BasicLabels not being updated
« on: September 27, 2016, 03:35:08 PM »
Hello,

Just wondering if I'm doing something wrong. When starting up a new project with AdvancedHMIBeta399a all I needed to do was add the EthernetIPforSLCMicroCom1 driver to my form, set the IP address of the PLC, add a BasicLabel, set the PLC address value and it just works! I have a value that changes.

I simply do the same with either AdvancedHMIv399r and even tried AdvancedHMIv399p and I get no change to the label, the text stays the same. I have tried other controls and the datalogger2 with similar results. No changes unless I use the older beta version.

I'm using MS Visual Studio 2015 and changing the controls right in the properties, no extra code at all.

Any help would be appreciated, I'm getting back to my project after some time off and an still very new at this!

Thanks,
Alan

12
Support Questions / Re: Append to a CSV file
« on: April 04, 2016, 11:48:06 AM »
Thank you for the reply,
I have tried something similar but this is precisely where my problem has been and I haven't been able to figure it out. I'm sorry if I'm missing something but with the code you gave me I now don't have 'w' declared, along with most of the Timer section, and am not sure where to do so.

You said:
Quote
The order in which values come back from a DataSubcriber2 is not predictable, so you have to take that in consideration.


Just to clarify, If I ask for ST20:19 and then ST20:0 at say, 3:10 PM and then ST20:19 and then ST20:0 at 3:11 PM this would work right? With the other values I just need them included in that run, I can place them where I want in a report later.

Again, thank you very much for your help!

Alan

13
Support Questions / Append to a CSV file
« on: April 01, 2016, 03:31:43 PM »
Hello, I was wondering if I could get a bit of help. I don't do much programming and I think that's why I'm having problems. My goal is this:

I need to monitor a PLC, when a data change is detected I need to read 5 values from the PLC and the write them to a CSV file. I need to append the time,  and the ST20:19, ST20:0 values to the file each minute and when a value changes. When the run is completed, the file will be closed and it should wait for the next run.

The way I have it now, a new file is created every minute, and the PLC seems to be being polled each second.

Here is my code:
Code: [Select]
    Private Sub DataSubscriber2_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber2.DataChanged

        Dim strFilename As String = Format(Now, "yyyyMMddhhmm") & ".csv"
        Dim strDateStamp As String = Format(Now, "MM/dd/yyyy")
        Dim strTimeStamp As String = Format(Now, "hh:mm tt")
        Dim path As String = String.Concat("C:\temp\", strFilename)
        Dim w As New IO.StreamWriter(path, True)

        w.Write(strDateStamp)
        w.Write(",")

        If e.PlcAddress = "ST20:1" Then
            w.Write(e.Values(0))
            w.Write(",")
        End If
        If e.PlcAddress = "ST20:2" Then
            w.Write(e.Values(0))
            w.Write(",")
        End If
        If e.PlcAddress = "ST20:18" Then
            w.Write(e.Values(0))
            w.Write(",")
        End If

        If Timer1.Interval = 60000 Then           
            If e.PlcAddress = "ST20:19" Then
                w.Write(e.Values(0))
                w.Write(",")
            Else
                w.Write(" ")
            End If
            If e.PlcAddress = "ST20:0" Then
                w.Write(strTimeStamp & ",")
                w.Write(e.Values(0))
            End If
            w.WriteLine(vbNewLine)
        End If
        w.Close()
    End Sub

Here is an example of the output (First CSV file):
Code: [Select]
04/01/2016, 03:09 PM,00:00:00         104.7C         0.2PSI

04/01/2016,CYCLE NAME: LIQUIDS 2,

04/01/2016,CYCLE TEMP: 121.0C,

04/01/2016,CYCLE TIME: 12 MIN,

04/01/2016,CYCLE ABORTED,

followed by (next CSV file):
Code: [Select]
04/01/2016, 03:10 PM,00:00:00          71.2C         0.6PSI

04/01/2016, ,

04/01/2016, 03:10 PM,00:00:00          71.4C         0.6PSI

04/01/2016, 03:10 PM,00:00:00          71.7C         0.6PSI

04/01/2016,CONDITIONING,

04/01/2016, 03:10 PM,00:00:00          71.9C         2.1PSI

04/01/2016, 03:10 PM,00:00:00          73.4C         4.5PSI

04/01/2016, 03:10 PM,00:00:00          79.7C         4.8PSI

04/01/2016, 03:10 PM,00:00:00          88.2C         4.8PSI

04/01/2016, 03:10 PM,00:00:00          93.8C         4.7PSI

04/01/2016, 03:10 PM,00:00:00          97.2C         4.6PSI

04/01/2016, 03:10 PM,00:00:00          99.5C         4.5PSI

04/01/2016, 03:10 PM,00:00:00         101.0C         4.2PSI

04/01/2016, 03:10 PM,00:00:00         101.9C         4.2PSI

04/01/2016, 03:10 PM,00:00:00         102.7C         4.1PSI

04/01/2016, 03:10 PM,00:00:00         103.3C         4.2PSI

04/01/2016, 03:10 PM,00:00:00         103.8C         4.2PSI

04/01/2016, 03:10 PM,00:00:00         104.2C         4.2PSI

04/01/2016, 03:10 PM,00:00:00         104.4C         4.1PSI

04/01/2016, 03:10 PM,00:00:00         104.6C         4.1PSI

I really only want the date, ST20:1, ST20:2 and ST2018: on the head of the first pass and to loop through ST:2019 and ST20:0, in one CSV file.
Then close and get ready for the next run.

Thank You,
Alan

Pages: [1]