Announcement

Collapse
No announcement yet.

DAQ and Graph problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DAQ and Graph problem

    Hello,

    I am a student doing a project at my university.
    I need to make a simple PID controler which takes information (process variable) from an outside source (a NI's DAC connected through the USB port ) which is acomplished 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. (I have attached the 2 .vi files of the 2 versions of my project )


    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-20mA?

    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 because of the range)

    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
    Attached Files

  • #2
    Re: DAQ and Graph problem

    what you could do is use variables which are real time and if there is no value it'll give you the default
    CORE 2062
    6 Safety Awards and Counting

    Comment


    • #3
      Re: DAQ and Graph problem

      So that will enable the passing of data through the loop, or?

      Comment


      • #4
        Re: DAQ and Graph problem

        when you call a local variable it will take the current value or default value if it hasn't been edited yet
        CORE 2062
        6 Safety Awards and Counting

        Comment

        Working...
        X