Problem with DAQ in while loop and Graphs

Hello,
I'm new here so I apologize if I posted this on the wrong board  
This is my "situation":
I need to make a simple PID controller which takes information (process variable) from an outside source (a NI's DAC connected through the USB port ) which is accomplished using NI-DAQ as an input, and the PID's output goes to the second NI-DAQ which is also connected using DAC to an actuator which in my case regulates the air pressure. (VI attached)
My problem is the following.
Both of the NI-DAQ I placed using DAQ Assist, require to be in a while loop.
-If I place them in separate loops, I have the problem of passing information between the Input NI-DAQ and the PID, and also between the PID and the Output NI-DAQ.
-If I place them both in one big loop, an error occurs saying that the selected buffer size is too small (Error -200609).
The timing settings for the DAQ's N samples, 100 samples to read at the rate of 1k (I also tried with Continuous samples and many different combinations of Samples to Read an Rate but without success).
Should I wire them with the same dt(s)?
The other thing I need to do (I'm also writing it here in order not to open new topics) is show the following 3 signals on a Graph (process variable (dynamic data type)(range 4mA - 20mA), PID output (double)(range 4mA - 20mA), and the Set Point (double)(range 0 to inf))
Firstly, is it possible to show the first two on a scale from 0 to 100 without changing the PID's output which needs to be 4-20?
Secondly, which graph should I use if I have different data types? (I tried the Waveform Chart, and succeeded in showing the first two; the third just messes everything up)
I would also have to make a legend explaining which signal is which (I see that this is possible with the Mixed Signal Graph).
I know this is probably too much to ask, but I'd be grateful for any help
Thank you in advance
Attachments:
PID while.vi ‏100 KB

My problem is the following. Both of the NI-DAQ I placed using DAQ Assist, require to be in a while loop.
-If
I place them in separate loops, I have the problem of passing
information between the Input NI-DAQ and the PID, and also between the
PID and the Output NI-DAQ.
This is the best option---Use QUEUE or Functional global or something else to tranfer the data to and fro
How  do I make that QUEUE or Functional global?
-If I place them both in one big loop, an error occurs saying that the selected buffer size is too small (Error -200609).
Have
you tried increasing the buffer? Is the acquisition happening
parallelly (means to say the first DAQ not wired (error terminal) to
second DAQ)
Well the buffer is, at least how I understood it, the option Number of Samples when in Continuous Samples mode. Concerning the parallel acquisition, do you mean I should wire the error ports of both of the DAQs?

Similar Messages

  • A problem with delays in timed loops and DAQ

    I am programming a simulation for nuclear rewetting for a visitor centre at my company in Switzerland. It involves heating a "fuel rod" and then filling the chamber with water. The pump automatically starts once the rod core reaches 750C. After this, a requirement stipulates that flow rate be checked to ensure the pump is operating at the necessary conditions. If it isn't, the heater must be shutdown to avoid, well... meltdown. However, we must allow 10 seconds for the pump to respond, while still allowing a DAQ rate of 10-100Hz.
    The challenge is that I can't add a delay in my main loop else delay all acquisition, but I can't figure out how to trigger a peripheral loop (with DAQ for the single channel of checking flow) from the main loop, and when the peripheral loop determines if flow has initalised, respond back to the main loop with the okay.
    I think much of my confusion is in the interaction of the loops and the default feedback nodes that labview is putting in willy nilly. Would the only solution be to have two 'main' loops that don't communicate with eachother but rather do the same thing while operating on different timing? Tell me if you want me to post the file (although its on an unnetworked computer and I didn't think it would be too useful).
    Thanks+ Curran
    Solved!
    Go to Solution.

    Here it is! It is not in any form of completion unfortunately.
    So reading in the temp with NI9213 and watercolumn height with NI9215, we determine to turn on the pump with NI9472. NI9421 determines whether the pump is on (there is flow) and I must respond accordingly.
    I have 3 scenarios similar to this one as well, so having redundant loops with different timing like I mentioned would be way to heavy. I think I may have though up of a solution? At the time the pump is initiated, we record the iteration and wait for a number of iterations that correspond to 10s to pass before fulfilling the pump shutoff requirement?
    Attachments:
    rewettin1.vi ‏15 KB

  • Problem with two parallel While loops

    I have a serious problem with controlling two parallel While Loop. Here is the deal:
    I have written a VI to send a series of commands called Cycle through Serial Port to a custom hardware. One of these commands is setting motor pressure by sending it's command and changing it's voltage. After setting desired pressure I have to read and control motor pressure, again through serial port in a parallel loop. There is a Pressure Sensor in system and I can obtain current's motor pressure by sending a command and receiving pressure value. In the first While loop I send some commands to hardware including Pressure Setting Command trough a state machine. In the second While Loop I read pressure value and then decide to increase motor voltage or decrease  it. Now the problem is in communicating these two loops. In cycle after "Init" state when state reaches "Pressure 2 Bar" motor voltage will increase. Meanwhile I have to control this voltage in parallel While Loop. As you can see I used Local Variable to communicate between these two loops. The problem is that loops are not synchronized. Specially when I switch to "Pressure 3.8 Bar" state during cycle running control loop (second while) is still working based on "Pressure 2 Bar" state not 3.8 bar. Because of this motor pressure goes to 3.8 bar for a sec (becuase of  "Pressure 3.8 Bar" state) and comes back to 2 bar (because the second while still has not gotten that new state,most probably cause of all the delays in the loop)  and after couple seconds it goes back to 3.8 bar.
    I really don’t know what to do. Is there a way to fix this? Or I should consider a better way to do this?
    I went through Occurrence Palette but couldnt figure out how to embed that in the VI. 
    Sorry for my poor English. I attached VI and it's subVIs as a LLB file. I can explain more details if somebody wants. 
    Attachments:
    QuickStartCycle.llb ‏197 KB

    I make it a point to NEVER have a WAIT function inside a state machine.
    It sort of defeats the purpose, which I define as "Examine current state; decide whether you've met the conditions to advance to another state, then get out".
    For example, I have a single state machine VI controlling four identical instruments, via TCP connections.
    For some functions, that means issuing a command, waiting 60 seconds, then reading results.
    If I waited INSIDE the state machine, then it's tied up waiting on one device and cannot handle any others.
    Not a good plan.
    To handle this, I have a loop which calls the state machine.  After issuing the command, the state goes to "Waiting on Response", and there is a target time of 60 seconds from now.
    It's called over and over in that state, and each time merely compares NOW to the target time.  If NOW is past the target, then we read the results.
    the state machine can tell the caller when to call back; that's how I distinguish between an urgent need and nothing-to-do.
    By having the CALLER do the waiting, instead of the state machine itself, the state machine is free to handle another device, or do something else on the same device.
    You should be calling the state machine over and over and over anyway.  So, have the state machine "control the pressure" on every call, and THEN examine whatever state it's in.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • I have problem with daq..when it is connected with laptop it asks for all the options like sampling rate etc..It displays building VI and it stops..it is not processing further..cau u plz help to solve this problem

    i hav problem with daq initialisation...plz help to solve the above mentioned issue

    Hi muthu,
    we also have a problem: to less information…
    - What is connected to your laptop?
    - What is "it" in "it displays building VI"? Do you use the DAQ Assistent ExpressVI?
    - What means "plz"?
    And could you please put less text in the title of your message and more text (with relevant information) into the message body?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • My daq 6008 wil not drop the 5V after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside

    my daq 6008 wil not drop the 5V on a digital output after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside, but i can t seemto get it to work

    i attached the block diagram so you can have a look
    Attachments:
    PID Temp control.docx ‏120 KB

  • Hi i'm using iphone 4 and i have problem with viber apps while i'm installing

    hi i'm using iphone 4 and i have problem with viber apps while i'm installing & registration process its says error on system mainternance. can you please help me out?
    thank you.

    OK, let's try again. Wind is NOT a supported carrier. In order to use tethering, it must be supported and activated by your carrier for the iPhone. This usually involves an additional fee.  You will have to ask your carrier if they can enable it. Odds are, since they are not a supported carrier, they can not. If you want to use tethering, you will most likely have to switch to a supported carrier that offers this feature on the iPhone.
    A list of supported carriers can be found here: http://support.apple.com/kb/ht1937

  • Having trouble with momentary delays while scrolling and typing, new problem that seems to be getting worse every day. Mouse?

    Having trouble with momentary delays while scrolling and typing.  It's a new problem that seems to be getting worse every day. Mouse? Internet connection? It's driving me nuts!

    Hi
    Did you find a solution ?
    I have the same problem on my iPhone 4

  • How to call sub VI and close the main VI in while loop and sequence condition

    Hiya,
    I have a problem with the while loop and the sequential condition in placed together i.e while loop as Global and sequential condition as local (i.e inside the Global loop). For example,when calling the sub vi from the main vi (main vi as main menu and sub vi as sub menu.)My problem is I can't run my sub menu when the particular icon is pressed through the main menu and only the front panel appears. My concerned was if possible the sub menu is activated in few second then jump back to the main menu again (analyze through the diagram).So, I don't know what should I need to do. If possible, please advice me how to encountered that particular problem.
    Thanks!

    Go to your block diagram of your main menu, then click on the "Hightlight Execution" it is something like a bulb. then you execute your vi. then LV will show you all your data flow.
    When you feel sad, laugh

  • While loop and for loop condition terminal

    Hello friends,
    I am using labview 8.6. The condition terminal of the while loop and conditional for loop is behaving in just the opposite way.
    When i wire a true to the condition terminal of my loop, the while loop continues to run when I click on run. when I wire a FALSE, it stops.
    Is there any setting change that I have to make it to get it work properly.
    Please suggest on this.
    Thanks and regards,
    Herok

    Please do NOT attach .bmp images with the extension changed to .jpg to circumvent the forum filters!
    Herok wrote:
    I am sending you the VI. I am not sure if this would help you because only in 2 computers this behaviour is seen. In others, it works as it is supposed to work.
    Whatever you are seeing must be due to some corruption or folding error. It all works fine here.
    To make sure there are no hidden objects, simply press the cleanup button which would reveal any extra stuff (which is obviously not there). Does it fix itself if you click the termination terminal an even number of times? What if you remove the bad loop and create a new one?
    Could it be you have some problems with the graphics card and the icon of the conditional terminal does not update correctly?
    Whay happens if you connect a control instead of a diagram constant?
    What is different on the computers where it acts incorrectly (different CPU (brand, model), #of cores, etc.) 
    LabVIEW Champion . Do more with less code and in less time .

  • I am using a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). How can I get a faster response?

    I am trying to create a virtual engine within a timed while loop and am unable to get the loop to run at a speed of less than 1ms (I am currently using the Wait(ms) function). This does not however allow realistic engine speeds. How can I overcome this? I have access to a PCI-MIO-16E-4 board.

    andyt writes:
    > I am using a timed while loop and am unable to get the loop to run at
    > a speed of less than 1ms (I am currently using the Wait(ms) function).
    > How can I get a faster response?
    >
    > I am trying to create a virtual engine within a timed while loop and
    > am unable to get the loop to run at a speed of less than 1ms (I am
    > currently using the Wait(ms) function). This does not however allow
    > realistic engine speeds. How can I overcome this? I have access to
    > a PCI-MIO-16E-4 board.
    Andy,
    Unless you use a real time platform, getting extactly 1 ms loop rate
    (or even less) is impossible. It starts getting troublesome at about
    0.1 Hz for standard operating systems.
    I'd tackle your problem with "if i mod 10 == 0 then sleep 1 ms".
    Of
    course this is jerky by design.
    HTH,
    Johannes Nie?

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • Problem with installing Photoshop elements 9 and adobe support advisor

    Hi, I've received a graphic tablet with 2 programs: the first has been downloaded and works perfectly while the second, PSE9, has been giving me problems for at least a week!
    I downloaded it and now I have a winzip file full of strange things (one of this is set up exe which tells me that I have to install adobe support advisor) and two files which said 3DF.tmp and PSEP9(1).zip.download and if I try to click them they tell me that I have to find on the Net the program to open them because I can't. And I don't know which program is required.
    I tried a lot of times to download the adobe support advisor, I have enough space on my disc and my farewall is deactivated, but when the program begins I saw this annoyant message
    cpsid_82829s5 Missing installation file bootstrapper error occured
    with this code for a support from adobe 00-67325-032018052012
    I unistalled it and retried, but nothing.
    Please, I just want to use my tablet with the programs which are comprised in the package, why it's so difficult to download this damn photoshop elements 9????????????
    Thank you

    In the error message it doesn't tell me
    "Installer has detected that a machine restart is pending. It is recommended that you quit the installer, restart try again,"
    neither "Installer failed to initialize. File not found. Please download Adobe Support Advisor to detect the problem."
    and I have enough space and I have Windows xp then I should be able to install it. I tried to unistall and install again the support advisor but nothing. I'm desperate.
    Messaggio originale----
    Da: [email protected]
    Data: 18/05/2012 22.20
    A: "Questionlady"<[email protected]>
    Ogg: Problem with installing Photoshop elements 9 and adobe support advisor
    Re: Problem with installing Photoshop elements 9 and adobe support advisor created by Jeff A Wright in Trial Download &amp; Install FAQ - View the full discussion
    Did you try the steps listed in http://helpx.adobe.com/creative-suite/kb/troubleshoot-error-messages-b ootstrapper-cs5.html which was identified by the Adobe Support Advisor?  If so can you please list each step and the result of those steps.  This will allow us to best advise you on your next steps.
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4420419#4420419
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4420419#4420419. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Trial Download &amp; Install FAQ by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Problem with two monitors while using Photoshop, windows move from 2nd screen to 1st screen.

    Problem with two monitors while using Photoshop, windows move from 2nd screen to 1st screen.
    I saved a new workspace and it did not help.
    No problem before I went to Maverick.

    I found the fix, go to System Preferences and open Mission Control and uncheck the box to keep monitors as they were (When switching to an application...........)

  • Problem with a nokia 5310 xpress and a bluetooth

    i have problem with a nokia 5310 xpress and a bluetooth!i can transfer anything from my phone to pc with or without pc suite! but when i want to transfer files from pc to phone i doesen"t work! with pcsuite soethings work but very slow! i want to transfer files witout pcsuite !
    the blue tooth adapter it is dongle and it the software that i use is BlueSoleil 2.6.08
    CAn anyone help me?

    I'm having bigger problems...
    the screen goes all white and off after a lil while....
    Not even the vendor could do anything....

  • Problem with the browse sequence back and browse sequence next widget placed in the screen layout

    Hi,
    Some basics: We are using Robohelp 10 to  generate multiscreen  html5 output. We used the pharmaceutical  screen layout downloaded from:  http://helpx.adobe.com/robohelp/robohelp-screen-profiles-layouts.html but modified it to match our GUI.
    We are having a problem with the browse sequence back and browse sequence next buttons placed in the screen layout from the widgets tool bar. We are in no way experts at this part of Robohelp...and the css portion of all this is a bit of mystery but we have managed to get mostly what we need. Now we just need these buttons to work. In the past we used Airhelp and things worked great. Can anyone help us understand why the sequence buttons are not showing up in the output even though it does in the topic preview?
    Also
    This shows up in the  layout.css file:
    a.wBSBackButton {
                    margin: 0 8pt 0 0;
                    padding: 0;
                    background-color: transparent;
    img.wBSBackButton {
                    border: none;
    a.wBSNextButton {
                    margin: 0 8pt 0 0;
                    padding: 0;
                    background-color: transparent;
    img.wBSNextButton {
                    border: none;
    Also btw, I forgot to mention that we are linking our FrameMaker files.
    Appreciate the help.
    Thanks!

    hi pradeep
    It does not happen but if you Wait for a while that may be solved

Maybe you are looking for