Author Topic: Help with New Guy Error (RSEmulate 500 Problem)  (Read 4118 times)

Charles

  • Newbie
  • *
  • Posts: 12
    • View Profile
Help with New Guy Error (RSEmulate 500 Problem)
« on: January 24, 2016, 01:13:08 AM »
Hello..
I am just starting out and learning PLC programming...
I put together simple project and believe I followed all the instruction related to the RSLogix Emulate 500.
When I run the project I only get this message over and over:

         "A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll"

It does not do anything. Is this a common issue with an easy fix? If not could someone please work the problem with me?
I'm using VS 2013 and have also tried it in VS 2010 express with the same results...
I have Virtual COM's on 3 and 4... with all the setting seen in the PDF and in some online videos and in someones project posted on dropbox.


EDIT:
I should have posted the start up output also so it can be more helpful:

'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\AdvancedHMI.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.DataVisualization\v4.0_4.0.0.0__31bf3856ad364e35\System.Windows.Forms.DataVisualization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x26a8 has exited with code 259 (0x103).
The thread 0x327c has exited with code 259 (0x103).
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\AdvancedHMI.exe'. Symbols loaded.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Cannot find or open the PDB file.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\AdvancedHMIControls.dll'. Symbols loaded.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Controls.dll'. Cannot find or open the PDB file.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\AdvancedHMIDrivers.dll'. Symbols loaded.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Users\gispro\Desktop\PLC_Stuff\_VB.NET_AdvancedHMI_BetaV399a\AdvancedHMI\bin\Debug\MfgControl.AdvancedHMI.Drivers.dll'. Cannot find or open the PDB file.
'AdvancedHMI.vshost.exe' (CLR v4.0.30319: AdvancedHMI.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file.
A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll
The thread 0x2884 has exited with code 0 (0x0).

EDIT:
I turned off "JUST MY CODE" per some advice I read and now I also get this exception..

   "A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll"


Sooooooooooo...... Can anyone take a shot on this one? I mean... even a long shot? Hell just guess... Like help a brother out...


Thanks,
Charles
« Last Edit: January 25, 2016, 12:40:42 AM by Charles »

DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Help with New Guy Error (RSEmulate 500 Problem)
« Reply #1 on: January 25, 2016, 04:12:38 AM »
The recommended software version to use is Visual Studio Community Edition 2015

 https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

Can you try it?

Charles

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #2 on: January 25, 2016, 03:59:41 PM »
Ok.. Thanks... I did install that version and same issue..
That version did allow me to debug the exception that express would not allow me to..
Here is what I found.
Error in this function on the return line...
It may be a bug in the program

    '* This is needed so the handler can be removed
    'Private Dr As EventHandler = AddressOf DataLinkLayer_DataReceived
    'Private Function SendData(ByVal data() As Byte, ByVal MyNode As Byte, ByVal TargetNode As Byte) As Integer

Private Function SendData(ByVal pccc As MfgControl.AdvancedHMI.Drivers.PCCCCommandPacket, ByVal TNS As Integer) As Integer
        If DLL IsNot Nothing AndAlso DLL.Count > MyDLLInstance AndAlso DLL(MyDLLInstance) IsNot Nothing Then
        Else
            CreateDLLInstance()
        End If

        Return DLL(MyDLLInstance).ExecutePCCC(pccc, TNS, MyObjectID)
    End Function

Values are:
MyDLLInstance=0
pccc = {MfgControl.AdvancedHMI.Drivers.PCCCCommandPacket}
TNS=1
MyObjectID=1


Edit:
A coworker or mine put the same setup on his machine and has the same results with this error...
Has anyone out there got this working with RSlogix? If so where do you think the issue is for our setup?
« Last Edit: January 25, 2016, 08:27:58 PM by Charles »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #3 on: January 25, 2016, 08:40:13 PM »
Charles,

Here is the link to a solution that works:

http://advancedhmi.com/forum/index.php?topic=516.msg4427#msg4427

If you download all the files and perform steps exactly as the pictures show then you shouldn't have any problems to run it.

So far, you have not described any steps you performed in your experiment. The first error you posted should indicate that there is no communication between AHMI and RSEmulate.

Charles

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #4 on: January 25, 2016, 11:43:21 PM »
Godra,
Thanks for the link. I have attached my setting and the COM ports from device manager..
What I found is strange... I am not sure it is the communication because your project kinda sorta worked.
When I clicked a button it took about 10 seconds for something to happen in the RSLogix and for anything to change on your screen.
Many times the buttons would show "Failed. No data received" instead of "I:0/0" when pressed.
The same exception  "A first chance exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll"
kept coming up and an error message I also attached.

I hope the pic provide something that is more helpful..
Thanks,
Charles

DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Help with New Guy Error (RSEmulate 500 Problem)
« Reply #5 on: January 26, 2016, 10:48:45 AM »
Charles,

One way that we might be able to help is to have a log of the traffic from your project.
There is a project here http://www.compuphase.com/software_termite.htm called Termite.
Please download and install this and put it in series between your AdvancedHMI and the RSLogix Emulator.
To do this create another virtual COM cable similar to what you did originally using ELTIMA.
One Virtual Cable will be AHMI <==> Termite Port and the other Termite Port Forward <==> RSLogix.
Also, copy the attached file into the installation directory and then select "Log Hex" from the Settings with "Hex Mode" checked.
Now run your test and reply and attach your output file.

For an example look at the TermiteExample attached. COM4 and COM5 are Termite In and Out ports here.

Doug Lyons

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #6 on: January 26, 2016, 11:01:22 AM »
Charles,

You can check your RSEmulator and make sure that only 1 emulation is running (close all the other ones if they are still present and running).

You can also try using different set of ports (COM2 and COM12) and make the changes accordingly in RSEmulate and AHMI.

Charles

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #7 on: January 26, 2016, 05:39:03 PM »
Doug, Godra..
Here is what I found.
I added termite between between the two and got Godra's project working.. Thanks Godra.
Then I created 4 AHMI .net projects using the exact same Emulator settings and RS Logix settings.

    My Original project in AHMI 3.99a                 (Error & no communication in temite)
    My Original project in AHMI 3.8.4 (Godra)  (Worked)
    Godra's project in AHMI 3.99a                     (Error & no communication in temite)
    Godra's project in AHMI 3.8.4 (Godra OG)  (Worked)

The DF1Com1 is diffrent builds and named different things in each project.
3.8.4 DF1Comm1
3.99a DF1Com1


« Last Edit: January 26, 2016, 05:42:12 PM by Charles »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #8 on: January 27, 2016, 09:10:55 AM »
The DF1 driver changed since certain AHMI releases (couldn't suggest the exact release).

You would have to try several different AHMI versions to figure which works and which doesn't.

You could stick with 3.8.4 for any project you might have in mind.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Help with New Guy Error (RSEmulate 500 Problem)
« Reply #9 on: February 15, 2016, 09:02:51 PM »
Here is a link to another post mentioning DF1 driver and possible solution (read the bold comment in the message):

http://advancedhmi.com/forum/index.php?PHPSESSID=82691d84e3742f62e6e52e3c4842d68a&topic=708.msg4368#msg4368

Also check messages posted after this one.
« Last Edit: February 15, 2016, 09:09:37 PM by Godra »