DAQ device control reference bug

I have found a bug when using a reference to a DAQ (8.3.0f3) physical channel control. We have a control that is hidden from view in a tab container and we have found that until the control is painted on the screen, we cannot extract the "value" property. Attached is a VI to illustrate the problem. To replicate the problem, do the following.
1) Open the VI - you should see only the text control.
2) Run the VI a number of times - the text control will not update.
3) Scroll left and bring the DAQ control into view.
4) Scroll right and bring the text control into view.
5) Run the VI - everything works fine.
I can force the control onto the screen and make it briefly visible to get around it, but it looks sloppy.
Brian Rose
Attachments:
test1.vi ‏8 KB

Just curious, though: is there a reason you can't
just read the value from the terminal instead of a reference and
property node and pass that value to wherever you need it?
We are using a cluster of references to the front panel controls to pass to various subVIs that perform the operations. Since we have many controls that are manipulated at various times, we decided it was easier to just pass them all around and dereference them where we needed them. This way we have one wire connecting the various VIs instead of a ratsnest of wire and logic.
The problem is that our main program front panel is a tabbed container. Our main window is in tab 1 and various other configuration controls are in the other tabs. We can't hide the control under something because the user may need to change it, so it would have to be accessable. The main front panel VI also does very little work and instead simply handles button presses and control updates and calls the appropriate subVI.
Brian Rose

Similar Messages

  • Programati​cally delete a DAQ device

    I have created a system with hardware (a USB DAQ) and software that is to be installed on multiple computers overseas. I want to make the set-up as easy as possible because I don't think the people doing the setup will be very well trained, and I won't be there to fix any problems.  I have created an installer that includes all the hardware as well as software setup, but there is one issue left, and I'm not sure what the best way to solve it.  If the installer is run before the DAQ is connected, then the installer creates a virtual device. If the DAQ is then connected, it is named Dev1, which doesn't work with any of my tasks, of course. I have some code that runs, and verifies the hardware set-up each time the system is started, so I can see if the device with the proper name is virtual, and if so, I can rename the actual and virtual DAQ device to the right names, so my tasks operate properly. However, I now have a virtual device hanging out on my system doing nothing, which I would like to avoid, because there is an outside chance that I will end up on the phone trying to explain to people how to straighten out a system when it goes bad, and I want to keep it as simple as possible.  I have two questions:
    Is there some way to delete the virtual device programatically?
    Is there some better approach to accomplish what I am trying to do? I thought about not allowing the installer to proceed if there is no DAQ device plugged in, but I don't know if that is possible.

    Jeff·Þ·Bohrer wrote:
    Hmmmm...... There has got to be a way to script up the "Toss Tasks to MAX" and "include .nce" as part of a "Deploy" process. Wirebird, Jack?  any opinions on that?
    I would tend to agree with John_P1's quote below:
    John_P1 wrote:
    I honestly just build up my tasks programmatically.... You can do just about anything that you could do in MAX programmatically via the System Configuration API.
     And I would tend to shy away from:
    Jo-Jo wrote:
    ...I just find [that using MAX] really speed development, and help with maintanence because you can test out all of your tasks in MAX outside of any LabVIEW code. And debug and toubleshoot hardware without using any of your own software, so you know any problems are not software bugs.
     once going into production. MAX tends to be a good tool for getting your feet wet after unboxing the hardware, but something you gradually migrate away from after the prototyping phase -- yet occasionally return to, as you mention, if you need to back up to square one for new prototyping or as a sanity check.
    It's possible to deploy NCE hardware behavior configurations, but not necessarily desirable. For the same reason it's possible to deploy any arbitrary configuration (INI, XML, ....), yet it's likely more desirable to build this configuration programmatically -- perhaps persisting it to disk if it's a user-modify-able configuration, or if it's desirable to persist user settings between subsequent deployments -- else it might be most desirable to keep the "configuration" hard-coded as essential business logic (as DAQ tasks might tend to be).
    Though, it sounds like you have a solution, and that's far more valuable than more work! Keep a tally on whether the current deployment strategy keeps you and your end users happy, and if so, keep it! Else, consider John_P1's advice, which is more likely to scale with your application if things get hairy.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Main VI stops when using control references.

    Hi, This is my first question on this forum. I've created an engine simulation VI which uses control references. The main VI has a data acquistion loop and control references. The control references link to another VI that runs an equation loop which continuously calculates engine speed base on data collected in the main VI. The control references work but the main VI data is collected and updated only once when the main VI starts. If I remove the control references from the main VI the daq loop runs fine. Thanks in advance for your help.
    Mike

    Joe,
    Thanks for the response. I do not load the subvi dynamically. I have attached a similar vi to show what I'm trying to accomplish. The DAQ vi reads the input and calculates the power. The power is sent to the "engine momentum sub" vi where the speed, as a function of time, is generated and sent back to the DAQ vi. I created the sub vi to clean up and isolate the DAQ vi from the subvi. I wanted the sub vi to run at a certain speed (by adjusting the wait time)and not affect the DAQ vi. If you input a value of 10 into the DAQ vi and then start it you will see the speed ramp up to 100. While the DAQ vi is running, I need to be able to change the input which would cause the power to change and in turn change the speed. I thought the control r
    eferences were the way to go. In my real DAQ vi, I have many more inputs, all which do not update after the first reading. I considered putting the DAQ functions in another subvi and reading the outputs through control references but that seemed too cumbersome.
    Thanks again,
    Mike
    Attachments:
    DAQ.vi ‏27 KB
    Engine_Momentum_Sub.vi ‏33 KB

  • Control references vs. global variables

    I guess my question centers on the appropriate application of control references.
    I am writing a complex program that has a state machine at the top level, and, for one frame of the state machine, a while loop containing a couple subVIs, each of which contains many subVIs. The lower-level subVIs are affected by buttons on the top-level VI. Information from the lower-level VIs must be shown on the top-level front panel within the loop. My question is: what is the best way to do this?
    (I have a previous version of the program that I wrote that keeps just about everything on the top level so that I can update the front panel, but this is not at all modular.
    In addition, I considered breaking things up into more than on
    e front panel, but this doesn't seem to be a good option for this section of this program.)
    Last week I read about control references, and decided that this could be the way to deal with this issue. I have not worked with them before, so I want to know: Are control references an appropriate solution for this issue? Is it good programming practice to use them, especially to update data on charts and graphs? How do they compare programming-wise and efficiency-wise to global variables?
    Global variables are another solution, I think, but I would have way too many variables to update. I think the advantage with global variables is that one could just insert a global variable in a subVI and not have to wire it up through the different subVI levels, which one would have to do (I think) with control references.
    Can you offer any advice?
    Thanks!

    Paul,
    The actual implementation of the solution is up to you. This is indeed a complex question.
    I would offer the following advice:
    On globals:
    Try to avoid them. I try to restrict the use of globals to unidirectional. If you have ever dealt with a race condition, you will know why. Mistakes are often made with globals, and they are quite apt to become the biggest source of bugs in a program, especially in one as large and/or complex as your appears to be. If you must use globals, try using a shift register, or LabVIEW 2 style global instead. Basically, you use an unitialized shift register with two (or more) cases: Read and Write. This prevents race conditions, but only if the VI is non reentrant. However, implementation is still difficult.
    Control References:
    I also have read and heard about control references. I have had much use for them, for controlling the appearance of controls and indicators (and decoratiopns too, I guess...). However, I would caution you on using them to pass data around. This violates dataflow in a big way, as you are passing around pointers, instead of data. I believe this is difficult to implement, and even more difficult to keep straight. I personally recommend using them only for attributes of FP components, not for passing data.
    So, what do I believe is the most elegant solution? I think a data server is your best bet. This is close to a LabVIEW 2 style global, but a little more active. Simply write all of your data into a subVI in any manner, a queue, a FIFO, LIFO, etc. Then, retrieve the data as desired. Buffering, queuing, etc are all handled by the data storage and retrieval subVI. It becomes sort of a small active database. The two sides (storage and retrieval) are independent of each other, and the code is all handled in the function. A basic version is a LIFO, Last In First Out, wherein the data is overwritten constantly. The data is then read by the reading VI, the front panel VI in your case, at any time, and the data is always the latest. You can add complexity as you need, such as making it a FIFO. This is done by simply writing the data to an array, then reading back the oldest value (by reversing the array and reading index 0.)
    I believe this is an elegant solution to your problem. It does maintain dataflow, except that time is taken out of the equation, depending on how you look at it. It simplifies your program because you only need to do three things. Write the data handler, then drop in the function into the VI that writes, and the one that reads. It is also flexible in handling the data.
    Good luck, and let us all know how you do.

  • Set Device Control to None

    Hi!
    If I set Edit->Preferences->Device Control->None and then restart Premiere it once again is set to DV/HDV Device Control.
    I need that it will be set to by default to None because I capture video in Premiere through Matrox (S-video) and if it is set to DV device control I got a message - "There are captured no frames"
    Thanks!

    http://www.matrox.com/video/en/support/
    I think this is a bug of Premiere, not Matrox.
    Why this preference can not be saved as None.
    If you want to capture with Matrox you capture with Matrox tools and not with Premiere.
    I know by myself how to capture
    I think You don't know about what I am telling.
    Any other opinion?

  • Can I use a NI 6009 DAQ device to act as a switch to close a circuit?

    Can I use (and how do I do it)a NI 6009 DAQ Device as a swith to close a ciruit?

    You can't use the 6009 as a switch. You can use the DIO to control a switch (like a FET or transitor).  How you would do this really depends on your application.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Daq device questions

    Hi:
    I need to syncronize AO and DO on a DAQ device. 
    I am thinking about USB-63XX series (for example USB-6341.), which has clocked DO, and probably cheaper than PCI series.
    I have checked this example : http://digital.ni.com/public.nsf/allkb/EBD603683446EC13862575B3006A63A2 , which makes DO's clock to be AO's sampling clock.
     (the website shows that example is for PCI-series)
    What I am not sure is, is this kind of shared clocks supported by most of the DAQ device with clocked digital output?
    Many thanks
    js777
    Solved!
    Go to Solution.

    Hi js777,
    You are referring to sample clock synchronisation as mentioned in the article in your post. This type of synchronisation is supported on most types of DAQ devices. Please refer to the following links for a list of the NI DAQ models that support this form of synchronisation:
    http://zone.ni.com/reference/en-XX/help/370466V-01/mxdevconsid/synchronmxsc/
    http://zone.ni.com/reference/en-XX/help/370466V-01/mxdevconsid/synchrone/
    Please note that as mentioned in here: http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/syncsampleclock/ this form of synchronisation can result in jitter when used with multiplexed DAQ devices.
    Thanks and Regards,
    Supreeth.K
    Applications Engineer
    NIUK

  • How do i detect DAQ device number programatticaly using Visual Basic (not using MAX)?

    how do i detect DAQ device number programatticaly using Visual Basic (not using MAX)?

    Several of the CWDAQ objects have Device (the device number), DeviceName, and DeviceType properties that I think will give you the information that you're looking for. For more information, look in the index of the Measurement Studio reference for Device, DeviceName, and DeviceType.
    - Elton

  • Programmatically identify and select DAQ device

    Hi all,
    I'm using Labview 8.0 to control a system which contains a USB DAQ device (9215A BNC for info). I can control everthing fine and use the DAQ card, but the software I'm writing will ultimately be supplied (as an executable or the like) with the system for use on end user computers. Its possible that some of the end users may already have NI DAQ cards installed in their systems. How can I make sure my software addresses only the DAQ card inside my system? Is there a simple way of programmatically listing all of the devices attached to the computer and then identifying the one that I want?
    If I name the device in NI MAX, for example, if I then plug it into a different computer, does it maintain that name? Or is that a local thing only?
    Any help would be greatly appreciated.
    Regards
    Paul

    Hi,
    thanks for the second reply. What I basically wanted was some way of finding the "device name" of the DAQ device in my system when its connected to a computer with multiple other DAQ devices attached. Ultimately, I did something similar to what you sent in that second example (see attached) which scans through the serial numbers of the DAQ devices attached to the computer and compares them with the serial number (entered manually) of my device. It then returns the device name that matches, so I can pass that to whatever future daq commands need it!
    Thanks again for the help
    Regards
    Paul
    Attachments:
    DAQ_ID_example.vi ‏20 KB

  • Which usb DAQ device to buy ?

    I am a total Noob when it comes to DAQ so please bear with me and help me with suggestiions on which NI USB DAQ to buy. I am biochemist and I have an old HPLC machine (basically a chemical purifying/seperation machine) I need to control by writing a labview program. I have labview 2013 and have some basic familiarity with it, and have used very easy VIs like blinking LEDs using arduino interface.
    My current project needs me to:
    1) control the flow rates on two pumps using their remote controller and vary their flow rates by varying voltages (0-10V) at not higher than 3 mA input current. basically, I need to be able to vary voltages on two analog pins. I am attaching the manual for the pump for more info. The pinout on the remote controller is on page 16/17 of the manual.
    2) I need to read analog voltage outputs from these two pumps (which measures the hydrostatic pressure) and save it to something like in .csv file.
    3) lastly, I need to read a analog output from a UV detector which will be in mV range and plot it and/or save that to .csv file .
    There are a bunch of NI DAQ USB devices which seems like they can do this job, my problem is that dont know enough to reliably make a judgement on which one to buy for this project. My budget is limited and I would definately like to do it with as cheap a DAQ as possible since we have multiple instruments like this, and we are planning to get rid of ancient 1990s computers running the original software and replace it with a USB DAQ device coupled with a labview program on a modern PC. The HPLC machines are far apart hence we run them on individual PCs instead of running a bunch on one computer through a DAQ device.
    I know its a whole bunch of questions, but I'll be glad for any guidance on this. also, to do the things I just described, how difficult do you guys think the VI would be if I use a NI DAQ and hopefully dont have any driver/communication  issues.
    Attachments:
    shimadzu-lc-6a-hplc-pump-service-manual-eng.pdf ‏985 KB

    I highly recommend you look up your local NI representative and have a nice sit down with them.  They can go over your requirements and give you really good advice on which device to get.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Advanced ?? Control Reference Update - Too slow.

    I have a main VI which controls a bunch of SubVIs. Each of these subVIs
    get data from the DAq and generate the plots and intensity graphs. I
    use a control reference to display these plots and graphs on my main
    VI. This is really slow. When I compare the speed at which the main VI
    is updated and the subVI is updated, there is a significant difference.
    Is this usually the case or am i missing something ?
    Thx
    Kudos always welcome for helpful posts

    I agree with tst, your PP VI runs at unlimited speed for no good reason. You should pace it with a small delay so it will release the control to other processes after each iteration.
    Also your DAQ part seems inefficient. Why do you configure the DAQ task from scratch, acquire, and close at every iteration? This is way too much work. You should flatten this out to the PP vi. Configure outside the loop on the left and close outside the loop on the right. Place only the ACQ part inside the loop.
    Also, place the real terminal of the graph inside the loop and clear it once at the beginning using a local variable. A local variable is always more expensive and less efficient.
    I don't understand why you need a timeout event in the main VI, it does not do anything except spin the loop, right? Just delete the timeout event.
    LabVIEW Champion . Do more with less code and in less time .

  • Unable to initialize capture device and device control in HDV

    I shot with a Sony HVR-Z1U/Z1N and am using a Sony HDV 1080i tape deck to digitize.
    I recently purchased a MacBook Pro and installed FCP Pro 5 on it. After getting over some time code issues we were chugging along, when on the 4th tape the image on the log and capture screen suddenly dissapeared (I could get audio and could see the image on the tape deck). Well after taking the tape out, checking and rechecking it I popped it back in and ever since then, I have been getting this error mssg "Unable to initialize capture device and device control."
    I have tried deleting the preferences and starting from scratch. If I do that, and choose the easy setup with HDV- 1080i60, it gives me this error "Unable to locate the following external devices- HDV (1440 X 1080) 30fps.
    I upgraded to FCP 5.1.2 this morning and upgraded the OS to 10.4.7 and QT to 7.1.3 and still no change.
    Im at my wits end, Ive been working on this for a whole week now.
    Thank you,
    Bugs

    It has been reported to take more than one attempt to correct the installation but, if properly executed on a machine without other system problems, the QT reinstall process does work. The key element here is you must reinstall QT after you trash the receipts. The process is listed below.
    x
    To do a full quicktime reinstall.
    Go to /library/receipts and delete any files that say Quicktime followed by a number e.g. Quicktime703.pkg
    Go to the Apple quicktime site and download the appropriate version of Quicktime to your hard drive.
    Run the Quicktime installer.
    Repair Disk Permissions for your System Disk (Disk Utility > Select the system disk > Repair Disk Permissions)
    Reboot
    If this doesn't work, then the problem lies elsewhere:
    1. your system - user preferences, firewire ports or other system elements.
    2. your equipment - camera/deck/firewire cables.
    3. your process - not setting up the software properly or using the software erroneously.
    Listed below is a troubleshooting process. Not all steps are appropriate but the general process of isolating the problem is useful.
    Troubleshooting Steps for OS X
    by Jan Johannsen (Collected from: Apple>User Tips Library>User Tips Contributions forum)
    FIRST AID
    01 Completely shutdown, wait a 5 minutes, restart
    02 Make sure you're not running out of free space on the System volume
    03 Check/fix the filesystem using Disk Utility &/or Diskwarrior
    04 Repair permissions using Disk Utility
    05 Create a new user account, and see if the problem persists there
    06 Clear system & user caches
    07 Run FCP Rescue
    08 Unplug all USB, Firewire devices except Apple mouse
    09 Startup in SafeBoot mode, and see if the problem persists there
    10 Reset system firmware
    MORE SERIOUS TROUBLESHOOTING
    11 Reapply the latest combo updater
    12 Run the Apple hardware diagnostic CD
    13 Check the hard drive for bad blocks
    14 Take out 3rd party RAM
    15 Unplug 3rd Party PCI cards
    16 Reset PMU
    17 Archive and reinstall the OS
    18 Reinstall the system from scratch
    19 Send the machine back to Apple

  • TS1741 Remote app on my iOS devices control my apple tv, but won't turn my newest gen apple tv on when i open the app.

    Remote app on my iOS devices control my apple tv, but won't turn my newest gen apple tv on when i open the app. It used to turn my previous gen apple tv on. Remote app controls apple tv just fine once i turn it on with the provided remote control. Help?

    Hello CournteyGould3,
    Congratulations on your new Apple TV!  I found an article with steps you can take when your remote app can't connect to the Apple TV.  I recommend following the steps in the article below (you can skip any steps you have already taken):
    Remote app for iPhone, iPad, or iPod touch can't connect to iTunes or Apple TV
    http://support.apple.com/kb/TS1741
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Get All Controls References

    Hi all
    If somebody know how can i get all controls references of VI (including controls that founds in Tabs and Clusters). I need generic method, because i haven't information about VI (reference to VI i get only at run-time).
    Thanks, Nadav

    To include the controls on Tabs, pass the array from my previous answer into a for loop, use auto-indexing. Place a Class Specifier Constant in the loop, right click on it and set it's type to a Tab Control. Place a "To More Specific Class" function below the constant, and wire the constant into the top.
    If the control from the array that you pass in is a Tab Control, "To More Specific Class" will NOT return an error. Use a case statement and use the No Error case to expose the Tab Control properties. Return the "Pages" property (an array) and pass this into a for loop. Connect a property node to the indexed pages, then select Controls On Page to return an array of controls ON EACH PAGE. You need to set up a shift register and use build array to return all of the controls from all of the pages. Make sure you close the Page Reference.  You can concatenate the array of Tab Control Page items with your original FP Controls.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Data acquisition with control references

    I'm a new LabView user and I would like to acquire data in a subVI and display that data in the main VI. I think that I need to use control references and refnums, but I just haven't been able to figure it out. I would GREATLY appreciate any help I could get.
    Thank you!

    From your description I would guess that the "subVI" has a loop in it that repeatedly reads the FP hardware, and the indicator is inside the loop. Right?
    The thing to do is move a lot of the logic in the subVI up to the Main VI--or add the Main's added logic to the subVI, whichever is easier. In the first case, the subVI would go away, in the second, the subVI would become the Main VI.
    If you're confused, post your code in V6.0 format and I'll show you what I mean.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • How can I access the iCloud email on used iPad 2

    I purchased two iPad 2's that were sold to a salvage company by an insurance company.  One works fine, the other says it is registered to someones iCloud account.  I understand that there is not a way to restore or bypass this.  Apple says you have t

  • Get question id's and its corresponding answer id for given Doc id's

    Hi, I am trying to write a program which gets the  Equality values (Questionaire - Erecruiting) like : 1) Gender 2) Care Resp 3) Care Type 4) Ethnic Origin 5) Religion 6) Disability 7) Sexual Orientation 8) Age Range And move it to an internal table

  • Help with UTF-8 / Working in JSP not in a Bean Help

    I am struggling with for last few hours. All I am doing is public class Text extends Object implements Serializable { public static Hashtable ht = new Hashtable(); public static void initL10N(){ public static String xyz = "आपके"; ht.put("hindi",xyz);

  • How to upgrade after an error?

    I tried to upgrade my tablet, but keep getting an error when I install it. How can I install it without having to resetting it back to factory settings?

  • Can't print message list?

    I have been looking for a way to print a list of messages from Mail.app. After about 2 weeks of searching I have nothing. I did find out that if I had an older version of Mail I could print summaries that had only the header information I need but it