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

Pages: [1]
1
Support Questions / Re: Troubleshooting DataLogger with no PLC
« on: November 22, 2019, 03:42:14 PM »
Thank you for your help!

2
Support Questions / Re: Troubleshooting DataLogger with no PLC
« on: November 21, 2019, 02:09:44 PM »
Specifically, I am trying to troubleshoot the DataLogging Functionality, and the creation of the file. I am using DataLogger2.

I have found where the file is created, and modified it slightly to write a header row based on the PLCAddressValueItems Collection. I have to create two datalog files as I have two PLCs I am connecting to, and I cannot figure out how to merge them - a problem for another time. I have added controls on my main HMI screen to update the Log Interval and Save Path for the log files, and that is what I want to test.

I basically want the datalogger to think it has connected to a PLC so that it creates the log files.

Code: [Select]

'* When the subscription with the PLC succeeded, setup for logging
    Protected Overrides Sub OnSuccessfulSubscription(e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        MyBase.OnSuccessfulSubscription(e)

        '* create the timer to log the data
        If m_LogTriggerType = TriggerType.TimeInterval Then
            If LogTimer Is Nothing Then
                LogTimer = New Timer
                If m_LogInterval > 0 Then
                    LogTimer.Interval = m_LogInterval
                Else
                    LogTimer.Interval = 1000
                End If
                AddHandler LogTimer.Tick, AddressOf LogInterval_Tick

                LogTimer.Enabled = True
            End If
        End If

        '* Create the file for logging data
        Try
            If sw Is Nothing Then
                sw = New System.IO.StreamWriter(m_FileFolder & "\" & m_FileName, True)
                'sw.WriteLine("TIME, KW, KVAR, VAB, VBC, VCA, IA, IB, IC, HZ, ") 'write header column
                Try
                    Dim StringToWrite As String = m_Prefix
                    If m_TimeStampFormat IsNot Nothing AndAlso (String.Compare(m_TimeStampFormat, "") <> 0) Then StringToWrite &= Date.Now.ToString(m_TimeStampFormat)

                    For Each item In PLCAddressValueItems
                        StringToWrite &= "," & item.Name
                    Next
                    sw.WriteLine(StringToWrite)
                    sw.Flush()
                Catch ex As Exception
                End Try
            End If
        Catch ex As Exception
            OnComError(New MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs(-101, ex.Message))
        End Try
    End Sub


3
Support Questions / Re: Troubleshooting DataLogger with no PLC
« on: November 21, 2019, 11:16:08 AM »
Unfortunately I am new to this, and don't really understand what a 'topic in linx' is or an OPC driver. Do you have a link to another forum thread, or a writeup that goes into more detail on that?

4
Support Questions / Re: Troubleshooting DataLogger with no PLC
« on: November 20, 2019, 11:21:21 AM »
I can look into that. I am using a AB ControlLogix

5
Support Questions / Troubleshooting DataLogger with no PLC
« on: November 19, 2019, 06:46:18 PM »
Can I 'trick' the data logger into believing there is a successful subscription the the PLC so that I can troubleshoot without being next to the PLC?

Pages: [1]