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 - pe.vallee

Pages: [1] 2
1
Support Questions / Re: PLC to C#
« on: August 10, 2015, 09:27:57 AM »
I've got an error message if I had these lines of code :
Code: [Select]


            var _msg = driver.Read( "d0", 1 );            Console.WriteLine( _msg );




An unhandled exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' occurred in AdvancedHMIDrivers.dll

Additional information: No reponse from PLC. Ensure baud rate is correct.


If I add a BasicLabel and set its address at "0" I can get the value,  but as soon as I add the Console output code, even if I didn't change the baud rate, I got this error.

2
Support Questions / Re: PLC to C#
« on: July 02, 2015, 10:04:52 AM »
at last , I finally found my problem ....
in my Main I wrote
Code: [Select]
            basicLabel1.ValueChanged += basicLabel1_ValueChanged;

and in basicLabel1_ValueChanged() I wrote
Code: [Select]
            Console.WriteLine( "basicLabel1 : " + basicLabel1.Value );

finally!!! :P

3
Support Questions / Re: PLC to C#
« on: July 02, 2015, 09:29:22 AM »
I did what you suggest :
  • Create a C# Form project in the solution AdvancedHMI
  • Insert the driver OmronEthernetFINSCom  and give if the IP address
  • Create a basic label and linked it to the address 0.0 of my PLC
While executing the debug, I can see the value of the label change immediately when I toggle the button plug in the PLC address,
what is the
Code: [Select]
basicLabel1 property or method to call to acces the value of the label from the Console ?!
I tried in an
Code: [Select]
while( true )loop the code
Code: [Select]
Console.WriteLine( "basicLabel1 : " + basicLabel1.value);
( and many other properties and method but I can't see the value printed in the console..
even a basicLabel1.Refresh(); before the Console.WriteLine();   but it doesn't work :(

4
Support Questions / Re: PLC to C#
« on: July 02, 2015, 08:15:56 AM »
One last question about that... :P

If, instead of a Form I want to use a console application.

I've create and Driver Object
Code: [Select]
private static AdvancedHMIDrivers.Omron.OmronEthernetFINSCom o_IPAdress = new AdvancedHMIDrivers.Omron.OmronEthernetFINSCom();
and then give him an IP Address
Code: [Select]
   o_IPAdress.IPAddress = s_address;
Then, I got this exception throwed by OmronEthernetFINSCom.vb
Code: [Select]
System.Exception was unhandled
  HResult=-2146233088
  Message=Incomplete Solution
  Source=MfgControl.AdvancedHMI.Drivers
  StackTrace:
       à MfgControl.AdvancedHMI.Drivers.Omron.FinsTcpDataLinkLayer..ctor()
       à MfgControl.AdvancedHMI.Drivers.Omron.FinsTcpDataLinkLayer..ctor(String ipAddress)
       à AdvancedHMIDrivers.Omron.OmronEthernetFINSCom.CreateDLLInstance() dans C:\Users\pe.vallee\Documents\Visual Studio 2013\Projects\PLCToFileThread\AdvancedHMIDrivers\Omron\FINS\OmronEthernetFINSCom.vb:ligne 133
       à AdvancedHMIDrivers.Omron.OmronEthernetFINSCom.set_IPAddress(String value) dans C:\Users\pe.vallee\Documents\Visual Studio 2013\Projects\PLCToFileThread\AdvancedHMIDrivers\Omron\FINS\OmronEthernetFINSCom.vb:ligne 31
       à PLCToFileThread.PLCToFileThread.Main(String[] args) dans c:\Users\pe.vallee\Documents\Visual Studio 2013\Projects\PLCToFileThread\PLCToFileThread\Program.cs:ligne 49
       à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()
  InnerException:


What did I do wrong ?

5
Support Questions / Re: PLC to C#
« on: July 01, 2015, 01:47:42 PM »
Many thanks for your help and for your time !!

I'll to work with the Advanced HMI :)

Best Regards !!!

6
Support Questions / Re: PLC to C#
« on: July 01, 2015, 01:45:34 PM »
IT WORKS!!!   AT LAST !!

The IP address 192.168.0.149 is the address of my Network Card  the IP address 10.10.3.40  is the address of my PLC the switch give to it ..    don't know why I haven't thought of it before !!

7
Support Questions / Re: PLC to C#
« on: July 01, 2015, 11:38:46 AM »
this is the switch I used : http://ca.dlink.com/products/connect/8-port-gigabit-desktop-switch/

if I bypass it to connect VIA an Ethernet cable my pc to my plc I will no longer connected to the internet but I'll have a direct link to my plc

8
Support Questions / Re: PLC to C#
« on: July 01, 2015, 11:31:42 AM »
yes, even if both, the server and the AdvancedHMI are off, there's still packets. I resolved the question.... I used a switch between my CPU and my PLC, the switch give my PC an internet access..

the Omron packets are between the switch and the PLC..  when I disconnect the plc from the switch and plug it in my PC, the packets stop,

but even if I bypass the switch, I cannot sniff any AdvancecHMI packets from WireShark...


9
Support Questions / Re: PLC to C#
« on: July 01, 2015, 11:18:19 AM »
I shut the OPC Server down .. I don't know what is talking... :\

10
Support Questions / Re: PLC to C#
« on: July 01, 2015, 11:14:06 AM »
Yet I started the DEBUG Visual Studio. I do not understand why I can see in WireShark

11
Support Questions / PLC to C#
« on: July 01, 2015, 10:36:18 AM »
I've install WireShark,(never use it before) set filters to Omron (since it is an Omron PLC  that I used).
I can see that the PLC (192.168.0.149) is talking (never stop !!)  with the input ID (10.10.3.40).
But when I manually toggle the button ('cause it's a button which is plugged in the PLC for my test).

I cannot see any difference of message from when the Boolean is set to True or False
Is there any way to see the message throught a network sniffer ?




12
Support Questions / Re: PLC to C#
« on: July 01, 2015, 09:10:47 AM »
yup I can :\

13
Support Questions / Re: PLC to C#
« on: July 01, 2015, 08:56:03 AM »
Can an OPC Server blocks device that want to communicate with PLC which are plugged in ??

I'm trying to communicate with a PLC to get its datas and then write data in it.   

Probably its my addresses which aren't good, but with
  • the BasicIndicator : PLCAddressSelectColor2 : <addresse of the tag (0.0)>
  • even if I set the IP address of my driver omronEthernetFINSCom to be the same as the network Card :  192.168.0.149


where did I go wrong ?

14
Support Questions / Re: PLC to C#
« on: June 30, 2015, 01:05:45 PM »
i'm not sure too, since I use KEPServerEX as my OPC Server, I think it's an ID that the server give to this PLC, understanding the Server may have many other PLC

15
Support Questions / Re: PLC to C#
« on: June 30, 2015, 12:20:23 PM »
thanks for the help,  it doesn't work at all :(

in the properties table of the basicIndicator I haven't the tab PLCAddressValue :(

I'll continue my researches :(

Pages: [1] 2