11-09-2020 02:22 AM - edited 11-09-2020 02:23 AM
Hi prabesh,
@prabesh99 wrote:
some times I got error 1 while running this Vi. How can I solve it?
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!)
11-09-2020 03:47 AM
Hi GerdW,
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
11-09-2020 03:58 AM - edited 11-09-2020 03:58 AM
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:
11-09-2020 09:49 PM
Dear GerdW,
Hi
Thank you for your suggestion. I have some questions.
Sometimes I did not get the header file. What is the reason behind it and how can I solve it?
I could not get a separate time and date format. How can I solve it?
I cannot get power and time in a row.
Thank you
11-09-2020 10:39 PM
The problem is you did not follow Gerd's advice. And you did not clean up the VI.
Get rid of the feedback node.
11-10-2020 02:43 AM - edited 11-10-2020 02:45 AM
Hi prabesh,
@prabesh99 wrote:
I could not get a separate time and date format. How can I solve it?
I cannot get power and time in a row.
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!
11-10-2020 08:46 PM
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.
11-11-2020 02:15 AM - edited 11-11-2020 02:18 AM
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.
11-11-2020 07:58 PM
@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.
11-11-2020 09:13 PM
Hi GerdW,
Thank you so much for your valuable suggestions. I cleaned up the VI, but still trying to figure it out to get rid of the feedback node. The header is missing at the 1st first execution and reappears on the 2nd time. I will apply your suggestion to solve it.
thanks