LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 74 occurred at Unflatten From String

Hi Cristina,

 

- provide both VIs of sender and receiver

- provide example data of sent and received strings

- create and use a typedefined cluster for sender and receiver

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 18
(1,779 Views)

Hi, you might have already figured it out by now, but anyway, when you used TCP Read function, occasionally it would return an Error 56 because your TCP Write function in the specified IP address had not written anything or because the reading loop is executing faster than the writing loop (or so I think, don't kill me. I am a beginner 😄 ). 

The Type Cast function that you used however won't be aware of this Error 56 and would still try to convert the incoming string into the specified format. I am pretty sure that this can cause Error 74 as I have experienced the same. In order to solve the issue you can use a combination of shift register and case structure to filter out the Error 56 before you go to Type Cast it into a number.

0 Kudos
Message 12 of 18
(1,706 Views)

Hi i encountered the same problem and i am not sure where did it go wrong in my code.......

 

ClientClientServerServer

0 Kudos
Message 13 of 18
(1,684 Views)

Here are the most glaring errors, bu there are probably more.

 

Client:

  • Your client is only sending the size because the flattened string is not wired to the second TCP write. (You fix that and the VIs will work just fine! :D)
  • I don't understand the TCP read (and all that case structure stuff). Nothing is ever sending anything on that connection. Can you explain? (Also, "clear error" lets you specifically clear error 56, no need for that pyramid of case structures)

Server:

  • The TCP read has a 1s timeout. I don't think you need the wait. The loop rate is determined by the sender.
  • The typecast inside the case structure makes no sense. Typecasting a string to a string does nothing
  • ...

General:

You should give all your cluster elements a descriptive label, then use bundle/unbundle by name. Much more self-documenting. You might even make the cluster a typedef.

Put all your controls/indicators in a cluster on the front panel. No need for bundling/unbundling. If you make the cluster container transparent, you would not even be able to tell the difference on the front panel.

...

0 Kudos
Message 14 of 18
(1,679 Views)

Thanks for the feedback alten,

 

to create the cluster i must do so by creating Reference of the various indicator/controls that i want in my cluster and use them to create clusters right? 

0 Kudos
Message 15 of 18
(1,657 Views)

@edmund99 wrote:

 

to create the cluster i must do so by creating Reference of the various indicator/controls that i want in my cluster and use them to create clusters right? 


Sorry, I have absolutely no idea what you are talking about. There is no need for references here. Can you add a few more sentences to explain what else is needed?

 

(Add the missing wire as instructed and you have a working VI. You can polish it up later.)

0 Kudos
Message 16 of 18
(1,656 Views)

Hi sorry what i meant was how do i create a type def cluster as suggested.

0 Kudos
Message 17 of 18
(1,651 Views)

Hi Edmund,

 

create the cluster with all needed elements, then store it as type definition...

 

Did you read the LabVIEW help on type definitions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 18
(1,648 Views)