Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - KanHaz

Pages: [1] 2
1
Support Questions / Re: Writing to PLC problem
« on: June 16, 2015, 01:30:21 PM »
It never made it to the break point. I did find the cause though. The timer was disabled... Thought I checked that before...  >:(

2
Support Questions / Writing to PLC problem
« on: June 16, 2015, 12:50:47 PM »
With the older versions I was able to put a timer in the form and run a basic If Then statement to read, do some math, or write to the PLC. Now the timer doesn't work and/or the write function doesn't work. Were there any changes made to the write function? -->
Code: [Select]
EthernetIPforPLCSLCMicroCom_CNC.Write("N7:16", PartCount)


3
Open Discussion / Re: DataSubscriber to read multiple tags
« on: June 15, 2015, 01:26:45 PM »
Good to know. I saw the DataSubscriber2 in the toolbox when I upgraded my version for Linux but didn't play around with it. Knowing how to use a single subscriber is now the focus of my Linux project because I get 3+ subscribers in one project and the form takes a while to load and updates about every 10-15 seconds. I have a clock on my page and it freezes for that long. Still haven't tried pulling information from a PLC yet, just trying to work out the bugs of why the form wouldn't load.

4
Open Discussion / Re: DataSubscriber to read multiple tags
« on: June 15, 2015, 11:31:29 AM »
I know this topic is old but are there any examples of how to do either of these methods?

5
Support Questions / Re: Linux Error Question
« on: June 11, 2015, 08:50:59 AM »
Are there any .dll files that I need besides the system.speech.dll?

6
Support Questions / Re: Linux Error Question
« on: June 11, 2015, 08:35:00 AM »
Did some testing last night and found the error I'm getting is caused by my program, unless something was changed in version 3.98n from 3.98m. Downloaded v3.98n and complied without any changes. Put it on both my Ubuntu 14.04 and Raspberry Pi 2 Rasbian systems and the program worked on both.

This is the error code I got when I tried my fully built program (v3.98m) on both systems:
(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised

(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised

(mono:8177): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.Exception: Incomplete Solution
  at MfgControl.AdvancedHMI.Drivers.CIP..ctor () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.Exception: Incomplete Solution
  at MfgControl.AdvancedHMI.Drivers.CIP..ctor () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforPLCSLCMicroCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0


The warnings at the top are only happening on the Raspbian RPi2.
I would like to find out what is causing the Incomplete Solution error. Is it something in my program or something I'm not doing to make the program complete?


7
Support Questions / Re: Linux Error Question
« on: June 08, 2015, 08:52:33 AM »
You can download the .iso image of Ubuntu and use PendriveLinux to create a bootable flash drive but the drive will need to be 4+ gb.

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

You can also create a bootable CD by burning the image to a CD but I'm not sure if you can modify the system.

I will have to look at the Raspberry Pi 2 guide again and try that method. I'm not stuck on Ubuntu, any Linux OS will work for me. And I had hoped we could use the Raspberry Pi 2 because it's so cheap.

8
Support Questions / Re: Linux Error Question
« on: June 05, 2015, 03:16:18 PM »
Thanks Archie. I'm testing this out on an ESC Liva but I want to try it on a Raspberry Pi 2. I've seen the other guides on how to do it with a Rasp Pi 2 so I'll use those but let me know if you have to do anything different than what is in the guides.

9
Support Questions / Re: Linux Error Question
« on: June 05, 2015, 02:34:29 PM »
I use "mono AdvancedHMI.exe" from the Debug directory. I wanted to make it as easy as possible to start then try my luck from there.

10
Support Questions / Re: Linux Error Question
« on: June 05, 2015, 01:59:26 PM »
I have 16 files in the folder (I just copied over the whole Debug folder) which includes the system.speech.dll file for the MessageDisplayByValue function.

11
Support Questions / Re: Linux Error Question
« on: June 05, 2015, 01:33:20 PM »
Yes, I have the new version 3.98m. I took the /AdvancedHMI folder from the old version I was using and put it in the new version and compiled it. Could that be causing the problem? Also, I get a small box that pops up and says "Incomplete Solution".

12
Support Questions / Linux Error Question
« on: June 05, 2015, 01:19:25 PM »
Hello,

Trying to get AHMI running on Ubuntu and I get this error message:

Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at AdvancedHMIDrivers.EthernetIPforCLXCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforCLXCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforCLXCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
  at AdvancedHMIDrivers.EthernetIPforCLXCom.CreateDLLInstance () [0x00000] in <filename unknown>:0
  at AdvancedHMIDrivers.EthernetIPforCLXCom.set_IPAddress (System.String value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) AdvancedHMIDrivers.EthernetIPforCLXCom:set_IPAddress (string)
  at MfgControl.AdvancedHMI.MainForm.InitializeComponent () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MfgControl.AdvancedHMI.MainForm:InitializeComponent ()
  at MfgControl.AdvancedHMI.MainForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.Create__Instance__[MainForm] (MfgControl.AdvancedHMI.MainForm Instance) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyProject+MyForms.get_MainForm () [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.OnCreateMainForm () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00000] in <filename unknown>:0
  at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00000] in <filename unknown>:0
  at MfgControl.AdvancedHMI.My.MyApplication.Main (System.String[] Args) [0x00000] in <filename unknown>:0

I tried to search for it so I can find out whats wrong but no luck yet. I might try Linux-Mint after the weekend to see if it works better than Ubuntu. Any help is greatly appreciated.

13
Ok, I finally understand what was going on. Thank you for the explanations. I don't need to read that many tags for this project but its nice to know what I can do.

14
Open Discussion / DataSubscriber to read multiple tags
« on: January 12, 2015, 09:36:38 AM »
Hi,

    I would like to read multiple tags with one DataSubscriber. Is there a tutorial or an example someone could post/direct me to? I've searched the forum and I've found bits and pieces but a full on example or explaination. If anyone could help I would greatly appreciate it.

Thanks in advance.

*Modified because I posted it before I could write anything.

15
using AdvancedHMI v3.83

I have been trying to read and write many tags to a plc, but when done in a group such as shown below, an exception will be generated.   I have set the poling rate as long as 5000, but still get the exception.  Ultimately I have about 50 tags to read and write, somewhat infrequently.  I am triggering the event to read and write the tags from a bit in the plc using the DataSubscriber component.


Private Sub DataSubscriber1_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber1.DataChanged

        g_PLCReadValues.PLCStageCounterValue = EthernetIPforCLXCom_MainForm.Read("StepNumber")
        g_PLCReadValues.MCR = EthernetIPforCLXCom_MainForm.Read("DI_MCRStatus")
        g_PLCReadValues.HipotPass = EthernetIPforCLXCom_MainForm.Read("DI_HiPotPass")
        g_PLCReadValues.HipotFail = EthernetIPforCLXCom_MainForm.Read("DI_HiPotFail")
        g_PLCReadValues.AirPressureSwitch = EthernetIPforCLXCom_MainForm.Read("DI_AirPressureSwitch")
        g_PLCReadValues.RejectPB = EthernetIPforCLXCom_MainForm.Read("DI_RejectResetPB.InDbncd")
        g_PLCReadValues.PLCStageCounterValue = EthernetIPforCLXCom_MainForm.Read("StepNumber")
        g_PLCReadValues.MCR = EthernetIPforCLXCom_MainForm.Read("DI_MCRStatus")
        g_PLCReadValues.HipotPass = EthernetIPforCLXCom_MainForm.Read("DI_HiPotPass")
        g_PLCReadValues.HipotFail = EthernetIPforCLXCom_MainForm.Read("DI_HiPotFail")

        If g_PLCReadValues.RejectPB Then
            btnRejectPBInd.BackColor = System.Drawing.Color.LawnGreen
        Else
            btnRejectPBInd.BackColor = System.Drawing.Color.DarkGray
        End If

    End Sub

Thanks for any suggestions.

Might be the wrong place to ask this question but what is "g_PLCReadValues"? I'm trying to understand how to use the DataSubscriber.
If anyone could point me in the right direction it would be great appriciated.

Thanks in advance.

Pages: [1] 2