10-25-2016 11:48 AM
What you posted should work, except you should just reed thirteen bytes?
10-30-2016 03:38 PM - edited 10-30-2016 03:39 PM
Hi Billko!
What do you mean when you say that?
Thank you!
10-30-2016 08:00 PM
Looks like you are reading 511 bytes. Oh, and don't forget to close that TCP connection when you are done with it.
10-31-2016 04:09 AM
Hy!
I tried with 13 bytes and also with 511 because this equipment have 511 bytes with data! But i received error after the TCP read(with 13 bytes) "The network operation exceeded the user-specified or system time limit."
what do you think about this?
Thanks!
10-31-2016 09:37 AM - edited 10-31-2016 09:38 AM
@marius.lucian wrote:Hy!
I tried with 13 bytes and also with 511 because this equipment have 511 bytes with data! But i received error after the TCP read(with 13 bytes) "The network operation exceeded the user-specified or system time limit."
what do you think about this?
Thanks!
I don't think it has 511 bytes, not according to the protocol. According to the protocol, if bit 11 is 0, the expected length of the data is 4 bytes. As per your example earlier, byte 11 in both send and receive are 0, so the send is expecting to send 13 bytes total, and you are exepcting 13 bytes total, which is exactly what your example on page 1 showed.
Your tasks, then, are:
11-01-2016 03:50 AM
Hy Billko!
I tried to read 7 bytes, but the "TCP read " has an error; Can you help me?
11-01-2016 08:50 AM
Hello everyone!
I find the answer! Before reading the data, needed to give it a command, meaning to write. Now it works fine!
Thank you for all your time!
11-01-2016 09:19 AM
@marius.lucian wrote:Hello everyone!
I find the answer! Before reading the data, needed to give it a command, meaning to write. Now it works fine!
Thank you for all your time!
Yes, that is the way communications with an instrument usually works. Sometimes data is streaming, but usually you have to ask for it.
Don't forget to mark your post as the solution so people can learn from it. If you have more questions, please create a new topic so people can plainly see this is a new issue.
🙂
11-02-2016 04:06 PM
Hy Billko!
Yes, i know this! But in the past i use the TCP protocol but I have not written a command to get an answer because i use some VI's (probably do this). TCP with ModBus Protocol.
Thank you for all answers!