Menu

Polling PLC in ASYNC Mode

Help
2011-07-19
2013-05-30
  • Trevor Garvey

    Trevor Garvey - 2011-07-19

    Hi All,

    Perhaps someone can help me here. I'm having some issues getting the Ethernet/IP driver to work in ASYNC Mode.

    From looking on the topic relating to Subscribe methods here is what I have written…

    (My Driver instance is PLC1)
    private void timer1_Tick(object sender, EventArgs e)
            {
                PLC1.AsyncMode = true;
                PLC1.ReadAny("N100:0", 50);
                PLC1.AsyncMode = false;

            {

    private void PLC1_DataRecieved(object sender, MfgControl.AdvancedHMI.DF1CommEventArgs e)
            {
                s1 = e.Values;
                label2.Text = s1;
            }

    For the call back I know this is wrong MfgControl.AdvancedHMI.DF1CommEventArgs but driver has changed since most posts were written on this forum. Does anyone know the correct CommHandler for data_recieved?

     
  • Archie

    Archie - 2011-07-19

    You are missing the Handles in your data received event:

        Private Sub PLC1_DataReceived(ByVal sender As System.Object, ByVal e As Driver.PLCCommEventArgs) Handles PLC1.DataReceived

     

Log in to post a comment.