Author Topic: App freeze AHMI V3.99x +Keyence SDK+SQLCE  (Read 1145 times)

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
App freeze AHMI V3.99x +Keyence SDK+SQLCE
« on: March 16, 2023, 01:58:44 PM »
I am using AHMI for connecting a Micrologix 1100 to SQL compact server. I have Keyence libraries to trigger a barcode scanner as well. But it crashes unexpectedly. I have been getting FormatExceptions all the time on the output. I tried to resolve it as much as possible. Any thoughts?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #1 on: March 16, 2023, 02:49:18 PM »
Do you get any details on where the exception occurs?

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #2 on: March 16, 2023, 02:51:04 PM »
All the time.  :( so I don't remember if it used to do before. I have only started looking at output window now.

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #3 on: March 20, 2023, 08:17:02 AM »
@Archie you got to help me here :'( . Initially I used messaging to communicate with the Sr-1000 barcode scanner. But I got into problems when I had to modify anything on the subroutine where I had message instructions. Rockwell says its a bug in RSlogix 500 and Rockwell said they don't fix this for Micrologic Controllers. Otherwise I was using AHMI only to use the SQL Compact Server. I dont see anything when it crashes. Also it doesnt do that on debug mode. It happens all the time when I run it from the debug or release folder.
« Last Edit: March 20, 2023, 08:24:07 AM by hsreekumary »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #4 on: March 20, 2023, 12:16:34 PM »
I need more details. Your program has a lot of code that was written, so I need to know where the crash occurs to know if it's in the code or in AdvancedHMI.

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #5 on: March 20, 2023, 12:59:33 PM »
Is there anyway I can get the exception details when it freezes when I run the release version of the app. because this happens mostly when I run the EXE file.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #6 on: March 20, 2023, 01:24:07 PM »
Does the PC completely freeze or do you get an exception crash?

bachphi

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #7 on: March 20, 2023, 01:44:31 PM »
Try this

Code: [Select]
Imports Keyence.AutoID.SDK
...
Dim m_reader As ReaderAccessor = New ReaderAccessor("192.168.111.104")
...

m_reader.Connect(AddressOf ReceivedDataAction)
...
Private Sub ReceivedDataAction(data As Byte())
        'Define received data actions here.Defined actions work asynchronously.
        '"ReceivedDataWrite" works when reading data was received.
        BeginInvoke(New delegateUserControl(AddressOf ReceivedDataWrite), System.Text.Encoding.ASCII.GetString(data))
End Sub
...
m_reader.Dispose()

Make sure to install the run time C++ library SR SDK.
Referencing two Keyence.AutoID.SDK.dll & Communication.dll
« Last Edit: March 20, 2023, 03:19:32 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #8 on: March 20, 2023, 02:08:35 PM »
Does the PC completely freeze or do you get an exception crash?
Just app freezes. It doesn't show any exceptions. I will have to close the app from the taskbar.

hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #9 on: March 27, 2023, 10:22:27 AM »
Try this

Code: [Select]
Imports Keyence.AutoID.SDK
...
Dim m_reader As ReaderAccessor = New ReaderAccessor("192.168.111.104")
...

m_reader.Connect(AddressOf ReceivedDataAction)
...
Private Sub ReceivedDataAction(data As Byte())
        'Define received data actions here.Defined actions work asynchronously.
        '"ReceivedDataWrite" works when reading data was received.
        BeginInvoke(New delegateUserControl(AddressOf ReceivedDataWrite), System.Text.Encoding.ASCII.GetString(data))
End Sub
...
m_reader.Dispose()

Make sure to install the run time C++ library SR SDK.
Referencing two Keyence.AutoID.SDK.dll & Communication.dll
I have to try that. I have used a different sample program to make this.
Does the PC completely freeze or do you get an exception crash?
Just app freezes. It doesn't show any exceptions. I will have to close the app from the taskbar.
This what shows up everytime. It creates this exception every time
Exception thrown: 'System.FormatException' in mscorlib.dll
Exception thrown: 'System.FormatException' in mscorlib.dll

AnnPark

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • game mod download
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #10 on: March 31, 2023, 04:19:04 AM »
I am using AHMI for connecting a Micrologix 1100 to SQL compact server. I have Keyence libraries to trigger a barcode scanner as well. But it crashes unexpectedly. I have been getting FormatExceptions all the time on the output. I tried to resolve it as much as possible. Any thoughts?
To troubleshoot FormatExceptions when using AHMI to connect a Micrologix 1100 to SQL Compact Server and trigger a barcode scanner with Keyence libraries, you can try checking your code for format errors, reviewing the library instructions, checking the event log for additional error messages, updating your software, and seeking support from the AHMI and Keyence library teams.




hsreekumary

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: App freeze AHMI V3.99x +Keyence SDK+SQLCE
« Reply #11 on: April 05, 2023, 10:31:44 AM »
Try this

Code: [Select]
Imports Keyence.AutoID.SDK
...
Dim m_reader As ReaderAccessor = New ReaderAccessor("192.168.111.104")
...

m_reader.Connect(AddressOf ReceivedDataAction)
...
Private Sub ReceivedDataAction(data As Byte())
        'Define received data actions here.Defined actions work asynchronously.
        '"ReceivedDataWrite" works when reading data was received.
        BeginInvoke(New delegateUserControl(AddressOf ReceivedDataWrite), System.Text.Encoding.ASCII.GetString(data))
End Sub
...
m_reader.Dispose()

Make sure to install the run time C++ library SR SDK.
Referencing two Keyence.AutoID.SDK.dll & Communication.dll

I rewrote the whole program to use the methods used in your reply. It has not crashed yet. It is been almost over a week now.
Thanks to everyone who replied. I really appreciate this.
Thank you Archie for making AHMI.