Menu

how to use davewritebytes() function

Help
Anonymous
2012-05-29
2013-11-25
  • Anonymous

    Anonymous - 2012-05-29

    i am very new to this libnodave lib and also to c programming…

    pls help me..,
    how to write bytes to plc by using davewritebytes function

     
  • Giorgioloukas

    Giorgioloukas - 2013-11-25

    Try this

    Dim a As Integer
    a = Int(TextBox1.Text)
    buf(0) = Int(TextBox2.Text)
    If ComboBox1.SelectedItem = "Inputs" Then
    res = dc.writeBytes(libnodave.daveInputs, 0, a, 1, buf)
    End If
    If ComboBox1.SelectedItem = "Outputs" Then
    res = dc.writeBytes(libnodave.daveOutputs, 0, a, 1, buf)
    End If
    If ComboBox1.SelectedItem = "Flags" Then
    res = dc.writeBytes(libnodave.daveFlags, 0, a, 1, buf)
    End If

     

Anonymous
Anonymous

Add attachments
Cancel