01-14-2009 02:50 AM
I'm currently trying to do a bit of a review on some labview topics and I'm having the same problems I encountered earlier.
The issue is that I'm having a hard time designating a file path for the file writer VI below. When I run the VI, it gives an error message instead of the dialog box where the file path will be entered. It kept giving the error message below each time I run the VI.
"Error 1430 occurred at Open/Create/Replace. Possible reasons:
Labview: The path is empty. You must use an absolute path"
I will appreciate some help in this regard. Please see attached VI.
01-15-2009 01:00 PM
Hey Mbdeck!
There are two ways to fix this issue. The first method is to go to the front panel and right click on the 'File Path' Control and select 'Visible Items' and then select 'Browse Button.' This will add a standard file dialog to the control so that you can navigate to the file you're trying to open. One more thing we'll need to do if you're trying to select the path for a new file is right click on the 'File Path' Control again and select 'Browse Options.' Make sure the 'New or Existing' radio button is selected, as well as 'File or Folders.'
If you want the user to provide the path at runtime, place the 'File Dialog' Express VI (Programming»File I/O»Advanced File Functions).
It's that easy!
01-16-2009 02:04 AM
Knights W..,
I was able to fix the problem thanks. I do have a couple more questions.
First question.
I'm trying to write the code for a temperature aplication but the "hint" in the question suggested using multiple "Build text expess VI" in the code. That suggestion has left me a bit confused. Do you know why I'd need multiple build text express VI in this problem?. The statement in the "tip" about the Build text VI being limited to eight inputs still didn't make a lot of sense to me. I thought one should be enough. Here is the problem as outlined below:
Build a VI that performs the following tasks.
I've attached images of the fig1 spreadsheet and VI front panel.
Second question.
I received help in this forum a few months ago with coding a threshold VI and I thought I understood it but looking at it now, I realize that I'd need a bit more explanation to understand the code fully. Please include in your response the reason why auto indexing was disabled for the two inputs into For loop.
I know the stuff I just presented might seem like a lot but I'm just stuck and I can't help it.
Thanks and I'll appreciate your in puts.
01-19-2009 12:49 PM
Hey Mbdeck,
The tip that is causing confusion is simply saying if you have more than 8 text items you will need to use multiple Build Text Express VIs to accomodate the additional inputs and then serially connect the resulting VIs to merge all text together. For this example this isn't neccessary unless you are using more than 8 text items. To add additional parameters all you need to do is double click on the express VI and type in the syntax for your parameters up to 8 items (for example: a, b, c would be entered as "%a%,%b%,%c%" without quotes).
Auto indexing is disabled in your threshold inputs because we are operating on your array as a whole, not per element. Say we have an array with values [1 2 3 4 5]. If we auto index the array input, the first time through the loop the numeric input will have a value of [1] and won't be an array at all so it'll just be '1'. Now if we try to index the numeric at position N, we will get an error because the input is not an array. In your code, since we operate on our array inside of the for loop, we need to have the original array data each iteration in order to search for the next true condition and then index out the correct array element to build our resulting array.
01-19-2009 08:53 PM
Knight w.
Your response cleared up a lot of confusion. It was very helpful. Thank you.
01-23-2009 03:42 AM
Knights W..
I've ran into a problem and I need help. I wrote the code for the VI I posted above and it doesn't work. Here is the question again:
Build a VI that performs the following tasks.
Issues:
It doesn't display in excel as described in the question.
I couldn't wire it to display the date
It doesn't display comments
It doesn't plot a best fit curve
I've attached my VI and what the spreadsheet is supposed to look if done correctly.
Please take look at my code in the block diagram and see where I can make corrections to get it to work.
NB: I copied the thermometer sub VI in the in the code from the "temperature system demo VI" in the find examples section to simulate temperature data.
I'll appreciate any inputs.
Thanks
01-26-2009 03:15 PM
Hey Mbdeck,
FYI we like to keep forum posts modular and targeting a specific issue. In the future, please post new issues in a new forum post.
For today, here are my recommendations:
1. Please explain this in more detail.
2. I'd recommend using "Get Date/Time in Seconds" to actually get the time. "Get Date/Time String" extracts said values from an input string. For the time, I'd recommend plugging the 'Current Time' output from "Get Date/Time in Seconds" into the 'Time Stamp' input of "Get Date/Time String".
3. You don't get the comments because you don't have anything wired up to the 'comment' input of the build text VI.
4. I don't quite understand what you're expecting to plot a best fit curve. It looks like you're trying to build a simple XY Graph at the end of your VI. If this is the case, I would recommend using the XY Graph Indicator. If this isn't the case, please describe in more detail what it is you're trying to do.
01-26-2009 03:58 PM
Hi Knights W,
Here is what the VI is supposed to do:
Yes, it is supposed to plot both the raw temperature data and the best fit curve.
I'll start a new thread next time. My appolgies....
01-27-2009 05:25 PM
Regards,
Dan King
01-29-2009 10:00 AM
Hi Dan K
Thanks for the response. I don't quite understand your question regarding delimiters. In the "Build text VI", I used tab and end of Line to put the parameters in a spreadsheet format. For example, here is how I entered them in the dialog box of the "build text VI" :
%tab%%date%%time%%temp%%Avg%%comment%%end%
From the above, I'm not quite sure if I'd say that the tab is the delimiter here or the %. What is the role of delimiters?. Is the % the delimiter here?. How would a comma change things and in what situations can "commas" be used as a "delimiter" ?.
What do mean by this statement below?. Can you explain it a bit more?.
"Also, you should be writing your column headers before entering into the loop"