AdvancedHMI Software

General Category => Support Questions => Topic started by: cls on January 22, 2014, 06:00:56 AM

Title: Problem writing to PLC
Post by: cls on January 22, 2014, 06:00:56 AM
Hi

I have create a form and a button on the form that runs the following code:

Me.EthernetIPforPLCSLCMicroCom1.Write(Me.DigitalPanelMeter1.PLCAddressValue, CSng(0))

If I write to the plc it always has the value -416 no matter what I write).

Am I doing something wrong?

The PLC is a AB 1761-NET-ENI. The register is called C5:0.ACC in the PLC.

Best regard
Claus
Title: Re: Problem writing to PLC
Post by: dmroeder on January 22, 2014, 10:33:36 AM
The Net-ENT isn't a PLC, that is just an Ethernet to serial converter.  Can you find out what PLC it is connected to?  I've never worked with a Net-ENI and AdvancedHMI, but try this instead:

EthernetIPforPLCSLCMicroCom1.Write("C5:0.ACC", 1)

See if that writes a 1 to your counter accumulated value.
Title: Re: Problem writing to PLC
Post by: cls on January 23, 2014, 02:16:54 AM
I have tried several values (including 1) and no matter what I write to the PLC (/converter), the value in the register always become -416.

Writing bits to another register works ok.

I have been using a very old version 3.16 (or something like that), and it works fine in that version.
Title: Re: Problem writing to PLC
Post by: dmroeder on January 23, 2014, 11:02:27 AM
Oh I see, my reading comprehension has been failing me lately.  For some reason I thought AdvancedHMI was returning the -416.  Clear as day though now that I read it again.

Maybe a bug for Archie to look into...