LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to put header in write to put measurement file VI

Hi prabesh,

 


@prabesh99 wrote:


When do you get this error? Which conditions lead to this error?

(Maybe the filepath is wrong as is stated in this error message?)

 

Btw. Why didn't you follow my suggestion regarding this integer control?

And why don't you take the time to cleanup your VI to make it more readable? (Follow the StyleGuide, found in the LabVIEW help!)

Best regards,
GerdW


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

Hi  ,

Thank you very much for your prompt reply as well as your suggestion. yes, I forgot to put a path so I got an error.

 

I did what you suggest to me but I could not get what I want. I have attached VI below.

thank you 

 

0 Kudos
Message 12 of 21
(1,067 Views)

Hi prabesh,

 


@prabesh99 wrote:

I did what you suggest to me but I could not get what I want.


No, you did not what I suggested!

Place the terminal before the case structure:

Best regards,
GerdW


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

Dear 

 

 

 

 

 

 

0 Kudos
Message 14 of 21
(1,046 Views)

The problem is you did not follow Gerd's advice.  And you did not clean up the VI.

 

Get rid of the feedback node.

0 Kudos
Message 15 of 21
(1,041 Views)

Hi prabesh,

 


@prabesh99 wrote:


Use a better format string to get your desired "separate date and time". Read the help on format strings…

When you want "power and time in a row" then you need to remove the linefeed between them and replace it by a TAB char…

 

Your VI is still not cleaned up!

Best regards,
GerdW


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

Hi!

Thanks for your reply.

 

I cannot remove the feedback note. When I connect format into string VI with write to text file VI, the feedback comes automatically. When I tried to remove it, the  VI cannot connect. How can I get rid of the feedback note?

As I am a beginner in LabVIEW, could you please suggest to me how can I clean the VI?

Thanks in advance😊

 

Ps: Sometimes My header is lost, and again appear if I run the VI.

 

Screenshot (67).png

 

 

 

 

0 Kudos
Message 17 of 21
(1,025 Views)

Hi prabesh,

 


@prabesh99 wrote:

I cannot remove the feedback note. When I connect format into string VI with write to text file VI, the feedback comes automatically. When I tried to remove it, the  VI cannot connect. How can I get rid of the feedback note?

 

Ps: Sometimes My header is lost, and again appear if I run the VI.


Then you did something wrong. Please follow my suggestion as shown here.

 

(Right now I cannot open your LV2020 VI. Please "save for previous" to LV2017 and attach again.)

 


@prabesh99 wrote:

As I am a beginner in LabVIEW, could you please suggest to me how can I clean the VI?


Either use AutoCleanup or move the nodes/functions in the block diagram on your own until there are mostly straigth wires…

Please read the LabVIEW help on topic "Style Guide"!

 


@prabesh99 wrote:

When I connect format into string VI with write to text file VI, the feedback comes automatically. When I tried to remove it, the  VI cannot connect.


  • The feedback node is automatically placed because there is a checkmark set in the LabVIEW options. I recommend to clear that checkmark…
  • You cannot connect without a feedback node right now because there is a "circular dependency" in your code: learn about basic THINK DATAFLOW (see the LabVIEW help!) to circumvent such conditions!

 

Best regards,
GerdW


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

@prabesh99 wrote:

Hi!

Thanks for your reply.

 

I cannot remove the feedback note. When I connect format into string VI with write to text file VI, the feedback comes automatically. When I tried to remove it, the  VI cannot connect. How can I get rid of the feedback note?

As I am a beginner in LabVIEW, could you please suggest to me how can I clean the VI?

Thanks in advance😊

 

Ps: Sometimes My header is lost, and again appear if I run the VI.

 

 


Because the code that is generating the header string is relying on data that comes from the loop.  So when you try to do something that happens before the loop, you are generating a cycle.  LabVIEW has an annoying "feature" that is default that "helps" people who generating these cycles by throwing in a Feedback node.

 

Basically loop depends on header, header depends on loop.  That is not valid in LabVIEW, so it puts in a feedback node that cause the header data in the header to come from the previous iteration, one that didn't run and thus has empty data.

 

the wires that contain the data to create the header come through the loop, but the loop doesn't contribute anything in reality.

 

Completely unwire the inputs and outputs to the header building string function  move it ahead of the loop.  Now rewire it.

 

0 Kudos
Message 19 of 21
(1,002 Views)

Hi 

 

0 Kudos
Message 20 of 21
(998 Views)