LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 74 labview Unflatten from String multiple connections TCP/IP client server com

Hello,

      Attached is my whole project. The goal is to acquire data from cDaq of 8 channels using TCP/IP connection. I Have that part working fine. But I wanted to Implement another portion of the code, where the client can switch mode of data collection and send the commands to the server. It would be either cDaq or a built in waveform generator. but when I send the commands to the server, I get the error 74 when the commands from the client is being unflatten from string in the server. I know the commands I'm sending are compatible to data type of the unflatten to string. i just dont get why?

Could You help me?

The program is broekn down in many subvis. Waveform command receiver.vi is where the error happens. you might need a cDAQ or channel config list to make the whole project work or not if you disable some of it.

 

Admin Note - VIs removed per user's request.

0 Kudos
Message 1 of 10
(3,849 Views)

actually the lvproj file is just the description of the project and doesn't contain the actual VI embedded into it. So you will need to attach a ZIP file of your entier project hierarchy and not only the lvproj file alone.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 10
(3,846 Views)

Added the attached files

0 Kudos
Message 3 of 10
(3,840 Views)

Again, you didn't attach the VI where the error occurs. Zip up the entire project (all the subVIs) and attach that.

0 Kudos
Message 4 of 10
(3,823 Views)

Here's 3 subVIs on top of the 2 main VIs I have uploaded.

The site only allow 3 upload at at time

 

Admin Note - VIs removed per user's request.

0 Kudos
Message 5 of 10
(3,817 Views)

Remain subVis

 

Admin Note - VIs removed per user's request.

0 Kudos
Message 6 of 10
(3,816 Views)

ritch_by_nature wrote:

The site only allow 3 upload at at time


Why do you think we told you to UPLOAD A ZIP of the entire project? You're still missing all the controls.

 

After a quick look, your problem appears to be here:

ReadExtraByteProblem.png

On the server side, you read an extra byte. The client never sends that byte, though, so all the data that the server reads afterwards is corrupted.

0 Kudos
Message 7 of 10
(3,808 Views)

Hi,

  I uploaded all the subvis. And yes It does read it then it thorws and error, I clear the error and get the data after. there's no corruption in the data as fas as I know.  The additional one that you're  mossing. I just uploaded

 

Admin Note - VIs removed per user's request.

0 Kudos
Message 8 of 10
(3,793 Views)

@ritch_by_nature wrote:

  I uploaded all the subvis.


But you didn't upload the custom controls, so LabVIEW still complains about missing dependencies. When you post on the forum, you should make it as easy as possible for people to help you - which means they shouldn't get errors about missing files when they open your project, if possible.


@ritch_by_nature wrote:

  I uploaded all the subvis. And yes It does read it then it thorws and error, I clear the error and get the data after. there's no corruption in the data as fas as I know.


Have you understood how this code works? When you send a cluster, you send 4 bytes first, which indicate the length of the data that follows. Except that here, your server reads 1 byte first (which the client never sent), so then when the server tries to read the length, it reads 4 bytes - the last 3 bytes of the length, followed by some random byte from the data after it. That means the length is completely wrong, and as a result, the data is corrupted - it can't be unflattened because it's the wrong number of bytes and even if it were the correct number, everything would be shifted by one byte.

0 Kudos
Message 9 of 10
(3,789 Views)

Thanks for the explanation Nathan. I was following an example of a server that in the labview example templates. I will remove the first tcp/ip read so I can read all 4 bytes.

0 Kudos
Message 10 of 10
(3,785 Views)