11-20-2013 12:54 AM
Hello everyone,
I have an application that needs to send CMD commands to it over TCP.
The Command message have the format in The table attached.
I'm using this VI attached and when i monitor the port using CMD "NetStat" I see that communication is established but commands couldn't be sent.
So i susptect that data packets are not sent in the right way.
Can i have help here with it?
Best regards,
Ahmed
11-21-2013 10:40 AM
Here are several resources that might be useful in implementing your code
http://www.ni.com/white-paper/3098/en/
http://www.ni.com/white-paper/2710/en/
11-26-2013 12:17 AM
Hi again,
Thanks so much for the links, , I 've modified the code tb as attached.
The main code contains a simple TCP communication and the CMD VI contains an implementation for the CMD packet.ly
but it didn't work! what I'm sure about is that there a communiation established between the server and client VI.
11-26-2013 01:30 AM
Hi again,
I modified the code to be event-driven and it gave me error (56)!
11-26-2013 02:27 AM
There are two thinks as I see it.
You are sending 17 bytes over the network, but these number of bytes do not correspond to anything in the table.
And you are expecting to read 484 bytes, where did you get that number from ?
You are probably sending the wrong format of the command, and therefore you are not receiving any bytes back, and the read function is generating a time out error.
11-26-2013 05:55 AM
The data mask of the command frame shall be 18 bytes as the the table attached above.
I had an error of sending only 17 bytes and that made some conflictions with the receiver.
I found a parameter supposed to be 2 bytes but it was sent as 1 byte when fixed all are ok 🙂
Now i've to make a mask for the incoming data from server to be handled.