Recent Posts

Pages: 1 ... 8 9 [10]
91
Support Questions / System.StackOverflowException while trying to closed form
« Last post by thunting on January 30, 2024, 04:47:22 PM »
Hello,
I keep getting an exception when I close any form in my application. Here are the details:

System.StackOverflowException
  HResult=0x800703E9
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

The call stack trace shows a loop of 521 times while running the stock code listed below. The exception is thrown at My.Application.OpenForms(index).Close().

Thanks for any help

Code: [Select]
    '***************************************************************
    '* .NET does not close hidden forms, so do it here
    '* to make sure forms are disposed and drivers close
    '***************************************************************
    Private Sub MainForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing

        Dim index As Integer
        While index < My.Application.OpenForms.Count
            If My.Application.OpenForms(index) IsNot Me Then
                My.Application.OpenForms(index).Close()
            End If
            index += 1
        End While

    End Sub
92
Support Questions / Re: EthernetIPforSLCMicroCom Conect to Micrologix 1400
« Last post by Archie on January 30, 2024, 04:44:38 PM »
can you ping the IP address?
93
Support Questions / EthernetIPforSLCMicroCom Conect to Micrologix 1400
« Last post by Fer-Vargas on January 30, 2024, 04:38:16 PM »
I Have been reading the question and post, and I know this may be an old question for all.

Could you please help me understand how to use EthernetIPforSLCMicroCom or send me a manual to read?

I am trying to connect to a Micro 1400 and it shows me that I have an error, with the connection regarding either the IP of plc Issue or the Port number on the driver.

Also If you help me understand if on the reader I can ask for the address ("N19:0")? or if I need to use a specific address for those registers?

94
That's good to know. I will get the latest version and try again. I post here if the new version works for me.

Thank you for the advice!
95
The version of the dll is 1.2.5.0 when I look at the properties.
That's quite an older version. If you email sales at advancedhmi.com, and give your order number or email in which it was registered, you can get the latest version that won't give an exception.
96
The version of the dll is 1.2.5.0 when I look at the properties.
97
What version of the ClxDriver are you using? I want to make sure I test in the same version because an un-catchable exception should not be thrown.
98
I'm using the ClxDriver and I create a new connection like this:

Code: [Select]
_CLXDriver = new ClxDriver.EthernetIPforCLX
{
CIPConnectionSize = 508,
DisableMultiServiceRequest = false,
DisableSubscriptions = false,
IPAddress = ClientIP,
PollRateOverride = 500,
Port = 44818,
ProcessorSlot = 0,
RoutePath = null,
Timeout = 4000,
UseOmronRead = false
};

I wan't to make a class that automatically connects to the PLC when it is available, keeps retrying to connect when the PLC is not available and publishes an event when the connection changes. I subscribe to the following events:

Code: [Select]
           
_CLXDriver.ConnectionEstablished += OnConnectionEstablished;
_CLXDriver.ComError += OnConnectionLost;
_CLXDriver.ConnectionClosed += OnConnectionClosed;

The problem is that "ConnectionEstablished" does not fire if there is no Read called. So just creating the "ClxDriver.EthernetIPforCLX" object and waiting for "ConnectionEstablished" to fire whenever the PLC is booted up doesn't work since it never fires. If I do a read when the PLC is booted up it does fire, but if I do a read when the PLC is not booted up, an unhandled "System.Net.Sockets.SocketException" is thrown that I cannot catch since it is thrown on a different thread. So how can I know when the PLC is connected and how can I wait indefinately for a PLC to connect to?

Thnx!
99
Support Questions / Re: basic label or other help
« Last post by NotGnu on January 20, 2024, 01:42:37 PM »
Thank you so much.
If I lose you, I am effed.
100
Support Questions / Re: basic label or other help
« Last post by Archie on January 20, 2024, 11:34:05 AM »
Use HighlightColor, HighlightForecolor, and PLCAddressHighlight
Pages: 1 ... 8 9 [10]