I am trying to get a code to communicate with a third party hardware by TCP. To start with sending strings and returning data. I have looked up some of the examples and the code should be ok. Any advise as why it is not working would be appreciated. Thanks!
Please find the VI as attached.
Any advise as why it is not working would be appreciated.
What exactly is not working? You don't mention any problems…
Where do you have problems? Do you get error messages?
the code should be ok
- There is no error handling (apart from displaying an error at the end) in your VI…
- Do you really need to read just one byte to get the length of the message? Does that byte really contain a char from "0" to "9"?
- Which device are you talking to? Is there a manual for that device?
Standard data output format for the device is 1 byte, so that will get the length of the message
Checking the errors after stopping the code, it says
LabVIEW: The network operation exceeded the user-specified or system time limit.
I am trying to communicate to a data acquisition device. I have a list of commands, but not the manual yet.
I am guessing the way I am transmitting the string data is not correct, but not sure what I need to do with it.
I am guessing the way I am transmitting the string data is not correct
does your device expect some EOL chars ("end of line"), like CR of LF, before it will answer to a request?
but not sure what I need to do with it.
Then you will have to wait for this manual!
Yes I believe so. I need to somehow joint an End of line constant to the String. What is the best way to do this?
I need to somehow joint an End of line constant to the String.
Use ConcatString with the needed EOL constant…
(Hint: when you work with string constant you should always make the display mode indicator visible. It's a right-click option…)