02-04-2024 01:50 AM
hi.
I am a Labview beginner...
I keep receiving one piece of data. I want to use that data to create the program I want.
I expressed the algorithm that I wanted to create in a 'pdf file'.
I made a little bit of labview vi with my little knowledge, but it's not enough to build my algorithm.
I'm looking for help because there's no one around me to ask it.
Please help me...
thank you!!
Solved! Go to Solution.
02-04-2024 11:17 AM
Hi nickbruk,
@nickbruk wrote:
I am a Labview beginner...
…I made a little bit of labview vi with my little knowledge, but it's not enough to build my algorithm.
I'm looking for help because there's no one around me to ask it.
Why are there so many frontpanel elements without a label? Would you create code in text based languages like this:
IF "" THEN do something
"" := "" + ""
So PLEASE: NEVER delete the label of frontpanel elements! You can hide it on the frontpanel when it bothers you…
When you want to collect samples in an array then you need:
What's the point of running the loop endlessly?
Why is there a small wait inside the Save case, but not in your main loop?
02-04-2024 04:08 PM
As has been said, a diagram where almost all terminals have an empty string as label is very dangerous, because we cannot tell what's what and mistakes are easily possible. If you don't want to see the label on the front panel, you can hide it (right-click...visible items...label), but it should always be visible on the diagram and more importantly have a reasonable name (e.g. "save" instead of "Boolean 1")
Your jumble of string operations could be replaced by a single "format into string" with several inputs and a suitable format.
Your currently write three fields to the file: date/time, temperature, mean(x), Apparently you want to write the date/time only once, so that probably belongs before the loop. Since the path name is outside the toplevel while loop, it can never be changed once the program runs. Do you want to load that same file again or some other file?
You leave out many scenarios:
02-06-2024 06:14 AM
Thank you so much for your advice.
Labels were added to unlabeled panel elements.
Additionally, we used a shift register to store it in an array and averaged it.
Here, we entered a random number, but in reality, we are continuously processing data, so it runs endlessly in a while loop.
For string operations, I left it as is because I didn't know how to use the string format.
- If you press the save button before calculating the average of 6 values, the save button should not work. Therefore, when the size of the array exceeds 6, I want the boolean to turn on and the save button to become active.
- It doesn't matter if you average more than 6 values. However, when we press the save button, the array stored in the shift register is initialized and we should be able to receive 6 new values as an array again.
- The temperature can only be saved if the user inputs it. If we press the save button, I would like the temperature value to be reset to 0.
- Time/date and location input can only be done once, and if ‘x(mean data) and temperature(y) data’ are entered according to the conditions, they must be saved in the corresponding txt file.
- The file must contain at least 5 points to load the txt file and draw an xy graph.
- When we press the ‘Load button’, we should be able to select and load a txt file. (We will create many txt files with different data stored in them.)
- Scaling of the x and y axes is required.
- I am wondering how to specify the ‘reference point’ value. In my opinion, I would like to create a reference point check boolean and have it displayed next to the temperature and data mean in the txt file when clicked, so that it is applied when loading the txt file.
thank you,
02-10-2024 03:51 AM
I posted an answer, can you help me?
I need to make this program quickly...
Thanks you so much!
02-10-2024 10:55 AM
Hi nickbruk,
@nickbruk wrote:
- - If you press the save button before calculating the average of 6 values, the save button should not work. Therefore, when the size of the array exceeds 6, I want the boolean to turn on and the save button to become active.
- - It doesn't matter if you average more than 6 values. However, when we press the save button, the array stored in the shift register is initialized and we should be able to receive 6 new values as an array again.
- - The temperature can only be saved if the user inputs it. If we press the save button, I would like the temperature value to be reset to 0.
- - Time/date and location input can only be done once, and if ‘x(mean data) and temperature(y) data’ are entered according to the conditions, they must be saved in the corresponding txt file.
- - The file must contain at least 5 points to load the txt file and draw an xy graph.
- - When we press the ‘Load button’, we should be able to select and load a txt file. (We will create many txt files with different data stored in them.)
- - Scaling of the x and y axes is required.
- - I am wondering how to specify the ‘reference point’ value. In my opinion, I would like to create a reference point check boolean and have it displayed next to the temperature and data mean in the txt file when clicked, so that it is applied when loading the txt file.
02-13-2024 04:16 AM
hello.
Thank you so much for your reply!!
I would appreciate it if you could help me implement the LabView program based on this information.
I am attaching the vi I modified.
Thank you so much again.
02-13-2024 04:55 AM
Hi Nick,
@nickbruk wrote:
- Condition 1: I would like to add a condition where the save button is disabled and then when temperature, location and time are entered and the data array size is 6, the save button is activated and we can save.
- Condition 2: Also, when you press the save button, the temperature value must be reset to 0 and the 6 saved array values must be initialized so that 6 data and temperature can be entered again. After that, condition 1 is repeated.
- For the reference point, I created a Boolean button and saved it as ‘value 1’ when clicked, and 0 otherwise. When loading a graph, I would like to use the temperature with the ‘value 1’ in column 4 of the txt file as a reference point.
02-13-2024 10:32 PM
thank you!
I don't know how to implement the method you mentioned in my vi.
Can you show me an example in my vi?
02-13-2024 11:40 PM
3. There is no possibility of having more than two 1s in column 4.