Author Topic: Communicating with AB MicroLogix1000  (Read 2736 times)

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Communicating with AB MicroLogix1000
« on: July 16, 2020, 06:54:52 PM »
This topics is a common topics might have discussed hundreds of time in the forum. However, I could  not find any discussion here. I apologize, if I am raising this again.

Anyway, I am having issue communicating with PLC. Getting this message,"Failed to write value. No response from PLC". Here are my steps:
I downloaded the program successfully on PLC ("Do you go to Online". I clicked "No")
Closed the RSLinx
Went to bin folder of the Advanced HMI and open the AdvancedHMI.exe.
As I try to enter value, I get that message.
The PLC is connected in Com4. Below is the code setup,

 'SerialDF1forSLCMicroCom1
        '
        Me.SerialDF1forSLCMicroCom1.BaudRate = "Auto"
        Me.SerialDF1forSLCMicroCom1.CheckSumType = MfgControl.AdvancedHMI.Drivers.DF1Transport.ChecksumOption.Crc
        Me.SerialDF1forSLCMicroCom1.ComPort = "COM4"
        Me.SerialDF1forSLCMicroCom1.DisableSubscriptions = False
        Me.SerialDF1forSLCMicroCom1.EnableLogging = False
        Me.SerialDF1forSLCMicroCom1.IniFileName = ""
        Me.SerialDF1forSLCMicroCom1.IniFileSection = Nothing
        Me.SerialDF1forSLCMicroCom1.IsPLC5 = False
        Me.SerialDF1forSLCMicroCom1.MaxPCCCPacketSize = 236
        Me.SerialDF1forSLCMicroCom1.MyNode = 0
        Me.SerialDF1forSLCMicroCom1.Parity = System.IO.Ports.Parity.None
        Me.SerialDF1forSLCMicroCom1.PollRateOverride = 500
        Me.SerialDF1forSLCMicroCom1.TargetNode = 0

Am I missing any steps? Would appreciate your help.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #1 on: July 16, 2020, 07:22:32 PM »
Your target node is probably incorrect.

Make sure that Rslinx is completely shut down.
If you can see it's icon still in the system tray then right click it.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #2 on: July 16, 2020, 07:34:02 PM »
I don't remember for sure, but the MicroLogix 1000 may not support a packet size of 236. Try a lower number like 100

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #3 on: July 17, 2020, 08:00:42 PM »
Hi Godra,

You are right. Rslinx was lurking on Sys Tray. I turned that off and AdvancedHMI has started communicating with PLC.

Thanks Godra and Archie both!

Regards,

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Communicating with AB MicroLogix1000
« Reply #4 on: July 18, 2020, 12:09:30 PM »
I have another issue. Could any of you help me to understand? The PLC codes are successfully downloaded to AB Micrologix1000. Made the HMI, and it started communicating with PLC (Thanks to @Godra as he advised to check SysTyay).
After that I want to change something on HMI. Opened AdvancedHMI35v.sln. From there, opened MainForm.Designer.vb. Did some changes about location of the buttons, and hit "Start" play button to see that changes are right. Closed AdvancedHMI35.sln. Opened AdvancedHNI.exe from bin folder of Debug folder. Now, I see that HMI does not communicate with PLC (getting failed to write value message).I also see that Tx/Rx Led ON USB-1761-CBL-PM02 blinks. That means it is connected to HMI.

Please help me

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #5 on: July 18, 2020, 01:03:09 PM »
Why did you make changes in the designer code as opposed to using the designer? That is a risky file to edit because it can break your solution.

Are you saying it works when you run within Visual Studion, but not when you run from the exe in the debug folder?

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #6 on: July 18, 2020, 05:08:48 PM »
Hi Archie, before making any changes, as I opened the AdvancedHMI.exe file, everything was working fine, properly communicating with PLC.
I wanted to change the name of one of the Panel Meter. I closed everything and opened the Opened AdvancedHMI35v.sln. From there, opened MainForm.Designer.vb. Just changed the name of the Digital Panel meter (no other changes), and hit "Start" play button to see that name change was right. Closed AdvancedHMI35.sln.

Again, Opened AdvancedHNI.exe from bin folder, as I did originally. Now, I see that HMI does not communicate with PLC (getting failed to write value message).I also see that Tx/Rx Led ON USB-1761-CBL-PM02 blinks. That means it is connected to HMI. Normally, when HMI communicates with PLC, the Red Led blinks rapidly.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #7 on: July 18, 2020, 05:38:14 PM »
Running the project using the play button within VS should give the same results as running outside of VS. The only difference is VS puts debugging hooks in the file.

You say you are getting a write error, so there must be something trying to write a value. Do you have code that writes to the PLC or does this happen after you click on something?

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #8 on: July 18, 2020, 05:48:50 PM »
Before making any changes, I was able to write from HMI, no issue.

I made the changes as I explained before, now as I opened the AdvancedHMI.exe file and I noticed that it does not communicate (unable to write ). I did only change the name of one panel meter and nothing else.

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #9 on: July 18, 2020, 05:53:49 PM »
I am just entering how many cycles from HMI on Panel Meter. Before I was able to write that.

Now as I open the AdvancedHMI.exe, I see that Red led blinks. But earlier as I was writing the number on the panel meter, the Red led on USB-1761-CBL-PM02 was blinking rapidly (data are been transmitted and receiving back)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #10 on: July 18, 2020, 06:09:15 PM »
Go to your driver properties and see if you have the property EnableLogging. If so set that to True, then run the application again to get the error.

That will create a log file in the driectory with the exe. Post that file here and I will see if I can decipher why you get the error.

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #11 on: July 18, 2020, 07:02:25 PM »
Hi Archie,

Where do I find the driver property. I opened AdvancedHMI drivers and opened AllenBradley, right clicked SerialDF1forSLDMicroCom.vb. Could not fine EnableLogging. Here what I see when I hit the Start, the form opens up and close the form.

'AdvancedHMI.exe' (CLR v4.0.30319: DefaultDomain): 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.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\jgupta\OneDrive - Weber-Stephen Products LLC\Desktop\Start-Reset buttons - Copy\AdvancedHMIv399x\AdvancedHMI\bin\Debug\AdvancedHMI.exe'. Symbols loaded.
'AdvancedHMI.exe' (CLR v4.0.30319: AdvancedHMI.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.
'AdvancedHMI.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.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.exe' (CLR v4.0.30319: AdvancedHMI.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
and so on....
The program '[936] AdvancedHMI.exe' has exited with code 0 (0x0).

Thank you VERY much for your willingness to help me.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #12 on: July 18, 2020, 07:17:21 PM »
On the MainForm, the driver will be at the bottom in the component tray. It should be named SerialDF1ForSLCMicroCom1 Click on it to select the driver, then go to the Properties Window

Jaguar

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Communicating with AB MicroLogix1000
« Reply #13 on: July 18, 2020, 08:03:38 PM »
Hi Archie, I don't see any component tray at the bottom, as I click MainForm.vb. I see only codes. I attached the screen shot.


   
 
   

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5266
    • View Profile
    • AdvancedHMI
Re: Communicating with AB MicroLogix1000
« Reply #14 on: July 18, 2020, 08:12:21 PM »
Did you double Click MainForm ?

How did you add your original driver and panel meter?