AdvancedHMI Software

General Category => Support Questions => Topic started by: StevieG on September 28, 2016, 08:47:08 AM

Title: Additional Pages fail to communicate with the PLC
Post by: StevieG on September 28, 2016, 08:47:08 AM
I have created a second page to my project with the 'change form button' which works fine, I am able to toggle between pages 1 and 2 with no difficulty. The problem I am having is that I am unable to gain communication to the buttons on the second page from the PLC.
I have tried the same buttons (tested with the digital panel meter) on the first page with no problem, the comm component,  the plc address ComPort, the communication is ok, but when the components are loaded onto the second page I am unable to achieve communication with the PLC.
I have tried different switches, meters etc and different addresses, I am using the correct communication DF1Com1 via RS232.
Any ideas I would be really grateful
 
Thanks
 
Steve
ps. I would like to thank Archie for a great program.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on September 28, 2016, 08:52:02 AM
If you are using version 3.99r, the SerialDF1 driver will have an EnableLogging property. Set that True for all the driver instances. Then run the app to where you get the problem and post the resulting SerialLogFile.txt

Title: Re: Additional Pages fail to communicate with the PLC
Post by: Godra on September 28, 2016, 11:36:21 AM
StevieG,

Are you connecting to a physical PLC or a simulator?
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on September 28, 2016, 11:49:04 AM
Hi Archie, I am using version 399d, I have been unable as of yet to migrate over to the newer version, I am still tackling that option, I have read on here your method of upgrading and adding a project to the newer version, it does seem to be a bit tricky clearing the faults.  Do I need to upgrade to the newer version in order to have a 2nd page running.

Hi Godra, I am connecting to an AB SLC 5/04 via the RS232 terminal
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Godra on September 28, 2016, 11:58:03 AM
StevieG,

You can always download the latest version of AHMI for testing.

Keep your project as it is and just copy over the AdvancedHMI folder to the new version (test it and see of how many errors might appear).
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on September 28, 2016, 10:45:44 PM
I have upgraded to the latest version 3.99r (from version 3.99d) and I am finding these errors, I would be grateful if you could point me in the right direction in clearing there errors,

thanks.  Steve

Error   BC30590   Event 'Click' cannot be found.   

Error   BC30002   Type 'AdvancedHMIDrivers.DF1Com' is not defined.   

Error   BC30002   Type 'AdvancedHMIControls.DateTime' is not defined.   
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on September 28, 2016, 11:33:59 PM
Double click the 2nd error and change DF1Com to SerialDF1ForSlcMicroCom

Double click the 3rd error and change DateTime to DateTimeDisplay


Not sure about the 1st error. Will have to see more details on it.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on September 29, 2016, 10:15:40 PM
Hi Archie, thanks very much for your support, I have successfully corrected the errors with your suggestion, although 89 errors have also occurred. The main errors are the 'CommComponent' attributed to each basic label, so if I could understand what is going on with the first ones I'm sure I'll be able to rectify the others.

BC30456 - 'CommComponent' is not a member of 'AnimatingPictureBox'.
BC30456 - 'CommComponent' is not a member of 'DigitalPanelMeter'.
BC30456 - 'CommComponent' is not a member of 'DigitalPanelMeter'.

BC30456 - 'ChecksumOptions' is not a member of 'DF1Transport'.
BC30456 - 'SynchronizingObject' is not a member of 'SerialDF1forSLCMicroCom'.
BC30456 - 'OutputType' is not a member of 'SelectorSwitch3Pos'.
BC30506    - Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

Unfortunately I do not have enough experience with VB for me to rectify the faults alone

Thanks again

Steve

Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on September 29, 2016, 10:25:06 PM
Do a Search and replace of CommComponent with ComComponent

Delete the references to SynchronizingObject
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on October 01, 2016, 01:29:49 AM
Thanks Archie for your support, I did exactly as your instructions, I also deleted checksumoptions and outputtype, this allowed me to start the program without any errors. I was then able to connect to the PLC and gained communication, then for some reason, after I disconnected to I have been unable to gain communication again, when I attempt to connect I can see the Rx/Tx LED's flash on the Null modem connected to the PLC but no data transfer. Again any suggestions I would be very grateful

Thanks again Archie.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Godra on October 01, 2016, 06:26:20 PM
For a test, using the latest version of AHMI, you could create a clean new project and add the driver and 1 or more controls on each form.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on October 02, 2016, 05:52:07 AM
Thanks Godra I'll give that a go, all positive results I'll post here.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on October 02, 2016, 08:34:25 PM
Hi Archie, Godra. I have given it a go with a clean project, the first page has no problem in sending/receiving values. The 2nd page the Digital Panel Meter indicates that there is no response from the PLC. The driver is exactly the same as for page 1, SerialDF1forPLC5Com1, with the same settings.

I have attached the Serial Log File as requested. (the date was too large for this post)

Thanks again for your help.

Steve
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on October 03, 2016, 02:48:06 AM
This one is being a tricky one. I did notice in the log file that the data is only coming in at 1 or 2 bytes at a time. I thought this was the problem because I recently found a rare situation where if a byte value of 16 is returned and the packet splits right there, it will fail the checksum. But looking further into the file, I do see it is trying to open COM5 a second time which I'm guessing is when the second page opens. We did find a similar issue when using RSEmulate and there is a fix in the next version. Maybe this is the same thing causing the problem you are having.

When I get back to the office on Tuesday, I will test a patch to version 3.99r to see if it fixes the problem of trying to open the COM port twice. If so, I will post the patch for you to test out.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on October 03, 2016, 03:26:28 AM
Thanks again Archie for you help, I'm away from Tuesday for 2 weeks, hopefully if successful I can try out the patch when I'm back.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on October 05, 2016, 02:03:37 PM
Patch 3 for V3.99r has been posted that may fix this issue:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

Title: Re: Additional Pages fail to communicate with the PLC
Post by: StevieG on October 20, 2016, 02:32:45 AM
Hey Archie thanks very much for the support, the patch you posted worked, no more issues with loading 2nd pages and i have updated to the new version with now issues
Thanks again for an excellent program and for putting out there for free.

Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on December 06, 2016, 10:37:46 PM
Patch 3 for V3.99r has been posted that may fix this issue:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

Hi, Archie, I have the same issue. I have downloaded the patch from your link. Since I am a newbie for VB. Could you show me the steps to add the patch?

I have found four files with the same name as the patch (MfgControl.AdvancedHMI.Drivers.dll) in the AdvancedHMI folder.

One in the Debug bin of AdvancedHMI.
One in the Debug bin of AdvancedHMIControls.
One in the Debug bin of AdvancedHMIDrivers.
One in the Support of AdvancedHMIDrivers.

Should I just replace all of them with the new patch?

Also I haven't expressed my gratitude the other day as you answered my question so quickly and patiently. I really like working with AdvancedHMI, it is such a useful tool and I really appreciate you share it with us.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on December 07, 2016, 05:45:32 AM
Hi, Archie, I have the same issue. I have downloaded the patch from your link. Since I am a newbie for VB. Could you show me the steps to add the patch?

I have found four files with the same name as the patch (MfgControl.AdvancedHMI.Drivers.dll) in the AdvancedHMI folder.

One in the Debug bin of AdvancedHMI.
One in the Debug bin of AdvancedHMIControls.
One in the Debug bin of AdvancedHMIDrivers.
One in the Support of AdvancedHMIDrivers.

Should I just replace all of them with the new patch?

Also I haven't expressed my gratitude the other day as you answered my question so quickly and patiently. I really like working with AdvancedHMI, it is such a useful tool and I really appreciate you share it with us.
Version 3.99s is now available with all patches rolled into it.

https://sourceforge.net/projects/advancedhmi/
Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on December 07, 2016, 08:27:38 PM
Hi, Archie, I have the same issue. I have downloaded the patch from your link. Since I am a newbie for VB. Could you show me the steps to add the patch?

I have found four files with the same name as the patch (MfgControl.AdvancedHMI.Drivers.dll) in the AdvancedHMI folder.

One in the Debug bin of AdvancedHMI.
One in the Debug bin of AdvancedHMIControls.
One in the Debug bin of AdvancedHMIDrivers.
One in the Support of AdvancedHMIDrivers.

Should I just replace all of them with the new patch?

Also I haven't expressed my gratitude the other day as you answered my question so quickly and patiently. I really like working with AdvancedHMI, it is such a useful tool and I really appreciate you share it with us.
Version 3.99s is now available with all patches rolled into it.

https://sourceforge.net/projects/advancedhmi/

Thank you, Archie. I have downloaded it and will try tomorrow.


Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on January 06, 2017, 01:22:13 PM
Hi, Archie, I have downloaded Version 3.99s and working with it. But I still can not get the second page to work well. I am using EthernetIPforSLCMicroCom1. Everything is working well in the MainForm. I have put the same EthernetIPforSLCMicroCom1 in the second page. On the second page I have also put a illuminate button. But I cannot read from PLC. Is there any other Code set up I should do? I really appreciate your help on this.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: bachphi on January 06, 2017, 03:10:56 PM
Here are the steps that I did , worked for me.

1. Open solution & MainForm.
2. Build the project.
3. Drag & Drop EthernetIPforSLCMicroCom1 driver onto the form change ip address
4. Drag & Drop a basic label, scroll down to PLCAddressvalue and put something like N7:0
5. Drag & Drop  FormChangebutton and select FormToOpen to page2
6. Open Page 2.
7.  Drag & Drop EthernetIPforSLCMicroCom1 driver onto the form change ip address
8.  Drag & Drop a basic label, scroll down to PLCAddressvalue and put something like N7:1
9. Run your project
Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on January 09, 2017, 10:26:10 AM
Hi, bachphi,

Thank you for the reply. I have done the exact same thing you described and the basic label on second page is still not working properly.
The main form works well.

I have

5. Drag & Drop  FormChangebutton and select FormToOpen to page2
6. Open Page 2.
7.  Drag & Drop EthernetIPforSLCMicroCom1 driver onto the form change ip address
8.  Drag & Drop a basic label, select the ComComponent to EthernetIPforSLCMicroCom1,
scroll down to PLCAddressvalue and put something like N7:1.






Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on January 09, 2017, 01:40:41 PM
Here are the steps that I did , worked for me.

1. Open solution & MainForm.
2. Build the project.
3. Drag & Drop EthernetIPforSLCMicroCom1 driver onto the form change ip address
4. Drag & Drop a basic label, scroll down to PLCAddressvalue and put something like N7:0
5. Drag & Drop  FormChangebutton and select FormToOpen to page2
6. Open Page 2.
7.  Drag & Drop EthernetIPforSLCMicroCom1 driver onto the form change ip address
8.  Drag & Drop a basic label, scroll down to PLCAddressvalue and put something like N7:1
9. Run your project

Hi, bachphi,

I have restarted a clean program just to make sure I have done anything wrong. I did the same as you did but still
can not get value on the second page. The first page (main form) works well. I really don't know what I have done wrong.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: bachphi on January 09, 2017, 02:47:38 PM
lol, why dont you d/l the "t" version and try it again.
I will be d/l it soon.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on January 09, 2017, 08:32:29 PM
I created a sample project with two pages communicating with a MicroLogix. You can download it from here:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/

It is the project named EthernetSLCMainMenuStyle

You should be able to just edit the PLC.ini file to set the IP address of your PLC and run the program.
Title: Re: Additional Pages fail to communicate with the PLC
Post by: bachphi on January 09, 2017, 08:46:28 PM
lol, poor guy. I guess he will come back with something like "I cant d/l because I dont have a sourceforge account"
Title: Re: Additional Pages fail to communicate with the PLC
Post by: Archie on January 09, 2017, 09:12:36 PM
lol, poor guy. I guess he will come back with something like "I cant d/l because I dont have a sourceforge account"
I posted the wrong link... this is the corrected one without the need for an account:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/
Title: Re: Additional Pages fail to communicate with the PLC
Post by: gengfei1983 on January 10, 2017, 08:26:47 AM
lol, poor guy. I guess he will come back with something like "I cant d/l because I dont have a sourceforge account"
I posted the wrong link... this is the corrected one without the need for an account:

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/SampleProjects/

Hi, Archie,

Thank you for the sample program. It works well on the second page.

One thing is that I have also downloaded the 3.99s and it also worked well.

Yesterday I did the very same thing with 3.99t, but it didn't work.

Anyway I am so happy that the program worked and I really appreciate your time and help.