Jump to content

Kurt Friday

Members
  • Posts

    253
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Kurt Friday

  1. Hi Adam

    As I understand it you have a VI running on one machine acquiring data under MAX 3.0.1 and you are trying to acquire on another machine using the same vi under MAX 4.2.1.

    Just a couple of questions.

    1) What version of NI-DAQmx are you using on each system? You can find this out by going to MAX then expand the tree to display the Software versions. It may be that your hardware is not supported in the version of NI-DAQmx on the system with MAX 4.2.1

    2) What acquisition hardware are you using?

    3) Can you take a measurement on each system using the test panel?

    4) If you are using NI-DAQmx tasks are they setup identically on each system?

    5) Does your vi return an error?

    6) You mentioned if it matters which breakout device you are using, what ones are you using? Also have you tried plugging the breakout device from the working system into the one that doesn't work?

  2. I am trying to get labview to detect a toggle using a magnetic switch. I am hooking it up to an SCB-68 and want to use the +5v connector to feed a simple on/off into labview. What I'm having trouble with is figuring out how to connect it to the SCB. I've run one end to +5v and the other to 28-AI4, but this doesn't seem to work. (by reading voltage through the DAQ assistant)

    I wonder if anyone has experience running simple switches through labview and could offer some tips.

    Thanks,

    Brad

    Hi Brad

    I think the problem is that you are assuming that the +5V is referenced to AI_Gnd, its not its referenced to D_Gnd, so just include D_Gnd in your circuit.

    • Like 1
  3. Does anyone know how to change the default save name of a VI.

    E.g. you open a new VI, click Save, and the default name that appears in the file dialog is usually Untitled X (or Read/Write Data Member for a class).

    I don't want to save the VI to disk, I just want to change the default save name so I don't have to edit it as much.

    Hey Mate

    LabVIEW executes callback vi's on certain events, take a look at this article on OpenG.org

    You could possibly edit the lv_new_vi.vi that is called when you select New VI so your new vi isn't called Untitled X.vi

    I haven't played with this but sounds like the way to go.

    • Like 1
  4. the level VI is already in the example...I make that simulation from an example in the "Industry aplication" then "Process control"...the name is "Tank Simulation.vi"I have modify the VI, include the limitter of the "on-off" control...so the simulation will only fill the tank until some state and then control the in put water until the input equal with the out put...I'm a litle confuse how to tell you about this simulation because I study this program with "trial and error" not with a book...sorry if my english doesn't good enough...thanks before... :)

    Hey David

    Ok, I didn't realize it was built from an example, so I've got it now.

    You are almost there, I'm able to get it working however there are a few issues that I was able to identify and may have contributed to it not functioning as expected.

    1) Initialize your shift registers and feedback nodes.

    2) Your PID isn't tuned properly try setting Inflow Rate = 1000 L/sec, Off Limit = 20 cm, High Level Limit (setpoint) = 10cm PID Limit = 5 I was able to get PID control of the tank, but its oscillating quite badly so experiment with the settings till you get it right.

    Some suggestions to make your code better.

    1) You have subvi's with uninitialized shift registers, have an initialize Boolean that initializes the shift registers with appropriate default values.

    2) Your subvi's are a little confusing as you are not following the connector pane convention of inputs on the left outputs on the right, if you are running out of terminals to follow the convention then try a connector pane pattern with more terminals or try using a cluster, ie your PID inputs could be input as a cluster.

    Hope this helps

  5. My friend in this occasion it simply will not write the spreadsheet. I do not want this to happen.

    Instead I want to have control where I can insert number of samples (for ex.1000 samples) and a control where I will insert the rate (for ex. 100Hz).

    Consequently the vi will run t=N/f seconds. the vi that I have so far runs until I press the stop button.

    The problem lies in the polymorfic vi's DAQmx Timing.vi and DAQmx Read.vi.

    If you have time please take a look. Thank you!

    Hi Ginos

    Take a look at the code snippet below it should guide you as to how to log N samples to the spreadsheet but continue to display.

    post-1058-124832137482_thumb.jpg

    If you want to acquire a finite number of samples use the Sample Mode = Finite Samples in the Sample Clock and in your code check if the task is done using DAQmx Is Task Done.vi and if so terminate the loop as shown.

  6. Hi. Thanks sciware for the ctl file. but i do not know how i could integrate it into my main vi. do you mind telling me how i could use the pic ring? i have started a thread regarding the color led in ni forum yesterday too.

    Edit*: my groupmate has managed to get the results using the event structure.

    http://forums.ni.com...hread.id=425860

    Yair has a good point, have a look at the colorbox option.

    To see how to use the LED.ctl just drop it onto your front panel, make it an indicator and then wire a numeric control to it. You will see that.

    0 = Red

    1 = Blue

    2= Dark Green

    3 = Yellow

    So your 4 states or colors map to a numeric value.

    To make the LED.ctl I started with a classic pic ring and then copied images of a Boolean LED that I had painted different colors. You can get the images of the Boolean LED by editing the boolean control and then copying the image component. Then paste it into the pic ring. For more detail about editing controls have a search on the NI site.

    I'm not sure about your other issue, the link you have posted appears to be broken

  7. OK, Something clicked with this while I was having my coffee and Vegemite on toast.

    I think your problem is that your dynamic vi has dependencies on LabVIEW vi.lib, user.lib or instr.lib. The runtime engine doesn't have the capability to include vi's that are outside the vi's root folder, ie if you call a dynamic then all the depenant vi's and ctls must be in the same folder or they all must sit in a llb.

    So what you need to do is in your project create a Build called a Source Distribution for your dynamic vi Beta.vi that will copy all the dependancies to a distribution folder.

    I've included an example in 8.2 that demonstrates this.

    DynamicCallDemo.zip

    Included is the source and a build that demonstrates your issue and one that resolves it.

    The demo is dependant on OpenG Lib so included is Packages.vipc use VI Package Manager to install the OpenG Packages you need.

    Hope this helps

    • Like 1
  8. Hi,

    I have a main VI Alpha that calls another VI Beta with Open Vi reference, Invoke Node with FP.Open and Invoke Method Run VI.

    I have no error if the Vi are not executer but when I create the executer of the main VI Alpha it opens the VI Beta, it shows the front panel but I have the following error:

    "The VI is not executable. The full development version of LabView is required to fix the errors".

    I have the professional LabView 8.2, I try to create the executer of the Beta VI, or to add the Beta VI property: Run when opened but It doesn't work.

    Can you help me, please?

    Hi Vane

    Take a look at this post and see if anything applies to your case.

    If you are still having no luck post an example of your code that duplicates the issue.

    Edit

    OK I just noticed an older post of yours regarding the same issue

  9. After running a bunch of scripting operation on a VI, I got the following error that required me to kill LV.

    post-121-124822427076_thumb.png

    Anybody knows what this is (I am just curious since I don't really expect stability while playing with scripting)?

    PJM

    Hi PJM

    I haven't seen that before and I've played with scripting a bit. Can you define the scripting operation which caused the error?

  10. Understood, but at the same time, I'm looking for an appropriate single good place for a variety of tools and user.lib fits the bill, it just happens to be that this one thing (baseline template which requires 2 VIs and 1 Ctl) would have to have it's own special place just for itself which I still have not found an appropriate place for (which obviously can not be at a relative path)

    Hey Norm

    A great tool I've found is the get and set linker info scripting methods. You could copy your subvi's to a new location and then run a utility that would look at the linkages of each vi, if the linkage points to a symbolic path but that vi exists within the folder hierarchy that you have copied to then update the linkage info to point to the correct or desired vi.

    Edit

    I couldn't help myself, I had to play with it.

    The attached will re-link all your subvis contained within a directory, hence remove the linkage to symbolic paths. Doesn't handle LLB but it could be easily modified to do so

    LVLinker.zip

    • Like 2
  11. Also playing with the build in LV8.6.1

    Running the build errors when Spawn button is pressed complaining the VI is not in memory.

    I figured this may be from the constant folding of the casing out and LabVIEW being smart - so I changed the constant to a control defaulted as false, re-built and it works. I guess this has changed from the version you are using and thought it may be of interest if you didn't already know?

    JG

    Ah, yeah forgot about that. I've updated the code and included a build.

    SpawnFP_2.zip

    Enjoy the curry! (is it homemade?) - for brunch yesterday I had takeout Dosa Masala and Purri's with potatoes. :YumYum:

    Curry was OK, nothing special just some takeaway from the local, could have been a bit spicier. I made Beef Rendang the other day that was damn good, poked me right between the eyes.

  12. Hi,

    I am looking for a VI file for HP8714B RF Network Analyzer that has the following features:

    GPIB Interface.

    Simple MMI:

    *- Control the device functions:

    *- Sweeping frequency at constant power.

    *- Sweeping power at constant frequency.

    *- Record the results from screen for 2 channels (ASCII).

    Thank you.

    Feri

    Hi Feri

    Just browsing the NI Instrument Drivers and I found a driver for your instrument

    HP8714B

    This would be the best starting point, usually the drivers have a few examples that you could use to guide your application.

  13. One vi is missing "Level.vi

    Also, can you be a bit more explicit in describing the problems that you are having with your solution. What tests have you done on your code that are showing the issue?

    Present as much information as you can that demonstrates that you have had a good go at trying to resolve the issue.

  14. Hi Kurt - I tried the above but no luck - do you have any examples?

    I still cannot seem to get two FP in memory at the same time. Lets say I spawn two re-enetrant VI's and open their front panels with Show Front Panel:Property Node. If both are instantiated at the ~same time (i.e. using For Loop) the FPs open but th VIs don't run (observing run arrow). If I use a delay, the first runs correctly, then the second runs correctly, but the second one stops when the first spawned VI completes execution.

    This is the only way I can get it to go in LV 8.6.1 as well. In order to create two independent FP in memory.

    Seems re-entrant VIs share the same FP memory (mentioned in below post).

    I did find some more info from searching here, here, here & here

    No prob mate

    Just having a beer waiting for a curry, I can squeeze one out.

    Have a play with this.

    SpawnFP.zip

    • Like 2
  15. problems never ends!!

    well, i download a program-spy-watch-serial data.

    i have done a communication multi and software and i wanted to saw

    what data sends-recieves.

    now, software doesn't let me communicate with multi!!!

    says , (check COM1 or the unit)

    :(

    Did you have any success with the software from Uni-Trend?

  16. Thanks alot. ur attachment reduce my programming time. is there any limit to the number of input i can use as i might have more than 100 input?

    Do you mean that you may have more than 100 LED indicators working from the 1 input string?

  17. One thing I noticed from looking at your code and comparing it against the paper is that there is an issue in your integrating term as shown in the attached image.

    post-1058-124778731221_thumb.jpg

    Also you are using Add Compound Arithmetic you should be using Multiply Compound Arithmetic

    Have you also considered using the PID toolkit available from NI?

  18. I have also a of question regarding the Cont Acq Thermocouple Samples-HW Timed.vi. Is it necessary first to adjust in MAX the temperature range that i would like take measures or it is automatically adjusted when I configure the range in the Cont Acq Thermocouple Samples-HW Timed.vi.

    There are two ways to do this.

    1) Create a measurement task in MAX where you specify the temperature range and other parameters of your measurement and then in LabVIEW perform acquisition using that task.

    2) Basically create the task in LabVIEW by using DAQmx Create Channel where you can specify the range of your measurement. I believe in your case you are calling DAQmx Create Channel (AI-Temperature Thermocouple).vi where you do specify the limits and also thermocouple type, cjc source ect so for your case you dont need to jump into MAX to set anything up.

    • Like 1
×
×
  • Create New...

Important Information

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