07-22-2021 10:35 AM
Hello
I am a complete beginner with Labview. My task is to control a device which is on COM-Port 4
It has the following properties:
I know how the device normally responds to Input, in MATLAB i simply send the string "!0XFFFFFFFFFFFFFFFF" and when i read the output i get the response "Data shifted, output latched, flags are cleared"
However, when i implement this in Labview i get the Error (from my Communication Device)
Note that these are two separate lines, but in Labviews i need to read twice to display this entire message (for some reason)
and this error (from the error channel): 0x3FFF0006 (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8BmSAK&l=de-DE)
As i understand it the amount of transmitted data is equal to the requested amount of data, but there is more data, as a result i get a FIFO overflow, which also is a error message i get: "ERROR in UART-RX-Callback: FIFO overflow" and then " FIFO is now empty, flags are cleared"
Here is a screenshot of my VI (the file is also included)
Does anyone have an idea why i get this I/O error?
07-22-2021 11:12 AM - edited 07-22-2021 11:14 AM
@Fluktuation10111 wrote:Does anyone have an idea why i get this I/O error?
Probably because you are using "Bytes At Port".
I suggest you watch this video VIWeek 2020/Proper way to communicate over serial
07-22-2021 12:05 PM
@Fluktuation10111 wrote:I know how the device normally responds to Input, in MATLAB i simply send the string "!0XFFFFFFFFFFFFFFFF" and when i read the output i get the response "Data shifted, output latched, flags are cleared"
I'm new myself but I think I'm working on a similar problem.If anyone on here corrects me, listen to them (I know I will).
It might be that the message your trying to communicate is supposed to be in binary and as a result the device isn't getting the message you think it is and therefore isn't sending the response you normally get in MATLAB.
I working though something similar right now so I don't have the answer but here are the materials I've gathered.
----------------------------------------------------------------------------------------------------
NI Link
https://root.cerhttps://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MGcSAM&l=en-USn/
A good, though very old, forum link.
https://forums.ni.com/t5/LabVIEW/Writing-binary-data-on-serial-port/td-p/3086?profile.language=en
The video RTSLVU posted. (It's a great video. As a LabVIEW beginner I absolutely love that video.)
And Rapidtables has several good binary/hex/ASCII/etc. converters that I like to use with large strings.
----------------------------------------------------------------------------------------------------
Good luck. I'll be monitoring this post as well to learn from what anyone else puts down.
07-22-2021 01:44 PM
What device are you trying to communicate with? Do you have the specifications on the command structure? I really need a lot more information like the protocol in order to give any actual advice.