Author Topic: Using .NET DataGridView ?  (Read 1187 times)

busarider29

  • Newbie
  • *
  • Posts: 18
    • View Profile
Using .NET DataGridView ?
« on: May 11, 2017, 09:19:05 AM »
Greetings,

I want to use a DataGridView control in my application to write to PLC addresses.  The PLC is a SLC-5/05.  I did this for another machine that I wrote a .NET HMI for, but I was not using AHMI and the PLC was a Beckhoff CX2040.  I'd like to mimic what I did on that UI for at least this portion of this UI/HMI.  What is the least painful way to use a DGV to write to PLC addresses in the SLC?  Does AHMI have a ready-made built in control to easily do this?

Attached is a screenshot from the UI that I wrote for the CX2040 where I used a DataGridView control for.  I want to have it so that a user populates the DGV and then clicks a "Write To" button to write the values/entries to the appropriate PLC addresses in the PLC.  That's how the CX2040 UI works, so I would like to make this one like that too. 


Phrog30

  • Guest
Re: Using .NET DataGridView ?
« Reply #1 on: May 13, 2017, 01:41:02 PM »
AHMI doesn't have a prebuilt built DGV with comms.  But, it sounds like you have done this before, just with a different PLC.  The only difference should be when you write to the PLC.  I've been wanting to create something like this for a while.  I did one a while ago that simply iterated through all rows/columns and wrote the values to the PLC.  However, this seems very wasteful.  I wanted to do the write on cell dirty, but just never got back around to it.

James