Rebonjour ,
j'ai avancé dans mon code et j'utilise la librairie Libnodave cependant je pense que je l'utilise mal car je récupère toujours la meme valeur qu'il y est 1 mot a lire ou 2 milliars ...
donc voici mon code :
using System.Runtime.InteropServices;
static libnodave.daveOSserialType fds;
static libnodave.daveInterface di;
static libnodave.daveConnection dc;
private void button1_Click(object sender, EventArgs e) {
fds.rfd libnodave.openSocket(102, textBox1.Text); fds.wfd fds.rfd;
if (fds.rfd > 0)
{
di = new libnodave.daveInterface(fds, "IF1", 0, libnodave.daveProtoISOTCP, libnodave.daveSpeed187k); di.setTimeout(1000000);
dc new libnodave.daveConnection(di, 0, 0, 2); if (dc.connectPLC() 0){
int res;
int start Convert.ToInt32(textBox2.Text); int leng Convert.ToInt32(textBox5.Text); byte[] reponse = new byte[40]; res = dc.readBytes(libnodave.daveDB, 0, start, leng, reponse);
label6.Text = Convert.ToString(reponse); dc.disconnectPLC();
libnodave.closeSocket(fds.rfd);
}
else{
label11.Text = " la connexion a " + textBox1.Text + " echoue.";
}
}
}
Pour l'instant le label 6 qui doit contenir le résultat m'affiche chaque fois : System.byte[] et dans res j'ai toujours la valeur 10 ..
Si jamais quelqu'un sait quoi que se soit merci d'avance.