Author Topic: PLC to C#  (Read 10023 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: PLC to C#
« Reply #30 on: July 02, 2015, 01:37:19 PM »
For a console app, you could read directly through the driver:

Dim MyValue as string = OmronEthernetFINSCom1.Read("D0")

pe.vallee

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: PLC to C#
« Reply #31 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.
- In Strange Aeons even death may die -