Jump to content

gleichman

Members
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by gleichman

  1. QUOTE (prads @ May 28 2008, 07:55 PM)

    Hello,

    I want to write text into a text template file. For example, consider I open the template file which already has the following written in it:

    Name:

    DOB:

    Address:

    Phone:

    Now I have to write my name corresponding to the name field, and DOB,address,phone etc corresponding to its fields. When opened, it should look like:

    Name: Prads

    DOB: 10/10/2000

    Address: 122 MyBlvd MyState 11111

    Phone: 111-10101010

    Can somebody tell me the VI's I got to use?

    How should I move precisely to the position where data has to be written next. I mean, say I have written the Name and DOB, and now Iam trying to write the address......How do i jump to the location pointer corresponding to the address field. Is there a VI or an example which calculates and correspondingly ignores those text which is already present so that I can write in the required position in the file?

    Thanks,

    prads

    I have doubts about your question. :unsure: You can't insert new data into the middle of an existing text file. If you want to use a text file template, you will have to read it, insert the new data (in memory) and then write it back to disk. You could use unusual characters to mark where text is to be inserted such as ASCII(255).

  2. QUOTE (PaulG. @ Apr 25 2008, 03:08 PM)

    What version of LV are you using? I remember having similar issues in 8.20, but I don't seem to have this problem in 8.5. I just tried what you are doing in 8.5 and it seems to be working OK for me.

    I have had this problem in 8.5 and 8.5.1. I'd like to see your example where this does not occure. For my project I ended up making two type defs, one for my GUI and one for SubVIs. :angry:

  3. I ran your test and I saw similar results. When the wait time was set to 1 ms, the average wait time was close to 2 ms. BUT, "wait until next millisecond multiple" vi is not made for critical timing. At 1 ms it is probably running up against a wall of how fast it can go back and forth between the OS. The wait until vi is like a sleep command that allows the OS to perform other tasks. If you are looking for better timing use the timed loop. I replaced the while loop with a timed loop in your example and I observed a measured time of 1.025ms for a setting of 1.0ms.

    Download File:post-151-1207831749.vi

  4. QUOTE(fuzzycontrolfreak @ Feb 25 2008, 08:35 AM)

    Hello everyone,

    I am acquiring a digital signal from a rotating shaft encoder. The square wave comes at a rate of 36,000 pps, at almost constant intervals. What sampling rules does this application follow. Shall I go after the Niquist Criterion, or a 36kS/s is enough to catch all the signals.

    Thankyou very much for your help.

    That depends. What data are you trying to extract from your signal?

  5. QUOTE(tmunsell @ Feb 14 2008, 01:08 PM)

    Hi,

    Well, the main app is running well, but I've run into another problem that I've been trying to figure out for 2 days.

    I need to slow the front panel display for just 4 channels from the Daytronic System 10. All the other channels need to update in real-time, which it is doing now.

    I tried creating a new while loop outside the main one, and placed the indicators in the second loop. But, when I run the app using highlight execution, the data flow stops at the tunnel in the main loop. I'm not getting any errors, but for some reason the data just stops at that point. What am I missing? I've tried replacing the tunnels with shift registers, and still have the same problem. Help! I'm getting a wicked migraine! :headbang:

    I've attached a pdf of the block diagram.

    Todd

    You must learn the ways of data flow. A structure will begin execution when all inputs are available. The outputs of a structure will become available at the completion of all code within the structure. Hence your loops are tied together and will not operate in parallel. To seperate your loops you must remove the data flow dependencies between them. To share information between the loops you can use Queues (preferred), global variables, local variables, or uninitialized shift registers.

    Alan

  6. You're VI worked for me (WinXP, LV8.2.1). What results were you expecting?

    post-151-1197657185.jpg?width=400

    QUOTE(pdc @ Dec 14 2007, 01:11 PM)

    I use the In Range and Coerce Function to coerce the N terminal of a for loop but the output is never coerced.

    Also if the N terminal is in the range for the In Range and Coerce Function, the In range output need two run to turn on.

    Anybody can explain this strange behavior? :headbang:

    See the attached code.

  7. QUOTE(ajwhi3 @ Dec 11 2007, 05:22 PM)

    all i have to do now is figure out how to plot a multiplot inside a for loop using a property node

    Noooooo! :nono: Don't use a property node for updating control data. Just wire your array to the graph and don't do it in a for loop unless you want it animated. If your graph is not showing the data correct (transposed?), look at the help for your control type on how the data should be formatted.

    -Alan

  8. QUOTE(ajwhi3 @ Dec 10 2007, 06:37 PM)

    Hello Everyone,

    I have recently started a new job which requires me to use Labview and i must say that my programing is a little rusty, so hopefully someone here can lend a hand. I need to create two plots on the one graph spiltting the source data into two seperate colors depending on whether the gradient of the x value is positive or negative, i have tried to create a mathscript node to govern this but am having no luck, any help anyone could offer would be greatly appreciated.

    Cheers

    Adrian

    Are you trying to plot one array of values in two different colors where the color indicates the gradient? If so, make a two copies of your array and replace the indicies in the first one with negative gradients with NaNs and in the second array replace the positive gradients with NaNs. NaN = Not a Number which can be typed in directly in a numeric control or constant.

    - Alan

  9. Making a LabVIEW program into an executable can save some memory. Diagrams and debugging are removed in executables making them slightly more efficient. To create an executable with LabVIEW, you need the application builder which is an add on for FDS and Base. It is included in PDS and the DevSuites. I would not expect significant performance increase with an executable.

    Why do you assume that your problem is memory? Have you run the LabVIEW memory profiler? What kind of architecture are you using? Are you touching your hardware in more than one place?

    Some of us EEs right higher level software.

  10. I don't think what Chris is saying is true. My example calls a VI that is NOT in the exe. I have down converted it to 8.0.

    http://forums.lavag.org/index.php?act=attach&type=post&id=5482

    QUOTE(ars_stowers @ Apr 12 2007, 01:34 PM)

    My problem was that I was trying to dynamically call VIs not included as dynamic VIs in the build. Help from everyone in this discussion and fiddling around on my own helped me figure this out.

    The discussion shifted from there to the best way to design a plugin architecture to allow linking to the VIs in the executable by VIs not included as dynamic VIs at build time.

    I would have looked at your files, but unfortunately, I am stuck at 8.0.1 and can't open them.

    Hope that explains it better and sorry for being unclear in the beginning.

  11. I still don't understand the problem. You can dynamically call VIs outside of an executable. I've attached a simple example of this. The executable and the dynamic VI share a VI that is located in the exe. Example written in LV8.2.1.

    http://forums.lavag.org/index.php?act=attach&type=post&id=5481

    QUOTE(ars_stowers @ Apr 12 2007, 08:27 AM)

    Alan,

    The problem I originally had was in trying to leave my dynamic VIs out of the executable so that they could be changed or new ones created after building the main executable. The problem that I was running into was that I could not link to the subVIs I needed in the executable from the dynamic VIs. Integrating the dynamic VIs would indeed have overcome my problem, but that would still leave me without the ability to change which dynamic VIs were loaded from a config file.

    As chrisdavis has pointed out, I was having problems because I did not add my dynamic VIs to the executable build as dynamic VIs, so they were linking to the RTE subVIs. This was overcome by including them.

    jrdrolet's assertion was that it is quite possible to create dynamic VIs that link to subVIs within the executable without having those dynamic VIs prepared at build time. From a plugin architecture standpoint, this is an extremely powerful tool.

    Thank you all for your help; this discussion has been quite helpful and has gotten me thinking about how LabView actually does stuff.

    -Aaron

  12. Have you checked with your local sales rep? This is probably just a bug with update advisor. Download the new version and see if your serial number works with it.

    QUOTE(SciWare @ Apr 12 2007, 06:42 AM)

    I just used NI's upgrade advisor to check out the cost of upgrading my 8.2.0 to 8.2.1. I was a bit shocked that its going to cost me $1999 to get a bug fix. That's going to tear a big hole in this weeks beer budget.

    I noticed that when you upgrade you are forced to go with a 1 year SSP which is probably the bulk of the cost, but hey, I don't want one.

  13. I still don't understand the problem.

    VIs can be dynamically called in an exe, in an LLB, or just in some directory as long as the correct path is supplied. For my "plug-in architecture", in development mode, I store my dynamically callled VIs in a dedicated sub directory. During program initialization, I read the filenames in this directory and open a VI ref to each one and store the refs in a USR. Then I use Call By Ref as necessary.

    For my exes I roll my dynamic VIs into my exe. In the past I have left them out, but for various reason I now perfer to intergrate them in. The same VI that prefetches my VIs from the directory checks if the environment is exe and if it is it searches in the exe for files with a predifined prefix. I always use the same prefix for the dynamic VIs so the code doesn't change between Dev and exe.

    - Alan

  14. Have you tried mass compiling your old project?

    QUOTE(JodyK @ Apr 11 2007, 04:35 PM)

    For some reason after my upgrade to 8.2.1 the source builds from old project files always error out. I created a new project from scratch (one VI, very simple) and the source build worked fine. I tried creating a new source build in my upgraded project file but that errored out too.

    Each time the error said that it could not find one of the VIs in the project tree and that I should recompile the VI. Recompiling did not help and the VI definitely exists. I haven't had time to delve into this any further, but we use Source distributions to send clients a copy of their code all the time, so it is kind of important.

    Labview 8.20 actually had a weird change in the source build where the "preserve hierarchy" option would build using relative paths instead of absolute. I was kind of hoping that would be fixed, but now it looks as if source build has gotten even less predictable.

    -JodyK

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.