Simultaneous Control Using GPIB / DAQ

I am working on a project that is a continuation of a previous project. It involves controlling the temperature and pressure in two vacuum chambers. The original project controlled only one chamber and the original code contained a number of global variables. In order to control the temperature and pressure, the LabVIEW code reads in values from a data logger thru the GPIB interface. To regulate the temperature/pressure, a DAQ card is used to control a heater and a series of pressure valves. The client wishes to keep the original code and is asking me to incorporate code to accomodate the second chamber. One computer will be running identical LabVIEW programs(with different global variables and sub-VIs), one to control each chamber.
I am fairly new to LabVIEW and looking for a starting place or sample code that I can look at. I have duplicated the current code, renaming sub-VIs and global variables. The solution I have come up with so far is to have a VI that does all of the reading and writing, but I am unsure as to how the chamber LabVIEW programs will access it whenever a reading is needed or the temperature/pressure needs to be adjusted.
If further explanation or the original code is needed let me know, and thanks in advance for any advice that can be offered

Hi lrsantos,
It's unfortunate that you have to maintain the original architecture of the code, because this type of application would most likely be better implemented in a single top-level VI with subVIs. However, if that is not an option, I understand.
So, using notifiers you are able to easily transfer information between "independently-running" VIs. There is a very good example program on this (Wait on Multiple Notifiers.vi) that ships with LabVIEW. You can access this by going to Help->Find Examples->Search "notifiers". This actually does almost exactly what you are thinking about doing. You can make a 3rd VI that reads the information off of the USB port and then sends that information (via Notifier1 or Notifier2, depending on the chamber) to its respective VI. For example, one VI would be waiting for a notification (and data) from Notifier1 and the other VI from Notifier2. You could then process this information accordingly. Like I mentioned, this shipping example should show you exactly how to do this with the exception of 1 thing. If you are passing notifiers between top-level VIs, you will need to write the "notifier out" to a global from your 3rd VI and read it back into your 1st and 2nd VIs (to be passed to Wait on Notification functions).
As far as priority goes, you won't need to do anything. The way that I described the "3rd" VI as operating is more like a Producer of data and the "1st" and "2nd" VIs act like Consumers. Therefore, the Consumer VIs don't ever really "access" the 3rd VI, they are actually sent data from the 3rd VI.
Hope this helps!
Travis H.
LabVIEW R&D
National Instruments

Similar Messages

  • Simultaneous Sampling using a DAQ BNC2110

    Hey folks,
    So I'm trying to take data from two different photo diodes plugged into a NI BNC2110 DAQ but for some reason it's collecting a specified amount of data from one channel then it moves onto the other. I'd like for these to be collected at the same time but cannot figure out how to do it.
    I've attached my code as well as a sample of the data I've collected from a HeNe laser power fluctuation. After viewing the image you should see that Channel 2 is distinctly out of phase from Channel 0 whereas these should be directly in phase. Weird.
    Any help would be appreciated.
    Attachments:
    Light Sensor Comparison.vi ‏68 KB
    Phase Difference problem.PNG ‏82 KB

    It's not at all weird since that is the way you programmed the acquisition. You have one task for one channel that you start and then stop and then you start/stop a task for a different channel. You need to have a single task with both channels specified in the physical channel constant and change from 1Chan NSamp to NChan NSamp.
    p.s. You don't have any sort of loop. Please don't say you are using the Run Continuous button. If you are, stop doing that and place a while loop around the code you want to run. The code up to the Start Task and the Clear Task should be outside the loop.
    Message Edited by Dennis Knutson on 06-15-2010 02:11 PM

  • Dc voltage control using GPIB

    Hi ....
                    Can any one help me out in designing a VI which is used to control the external dc voltage source( max voltage 60v ).
    Thanks and regards,
    Sampath kumar chennuri.

    You left out the most important part if you want any detailed help. Namely, what is the make and model for your power supply. You can go to http://sine.ni.com/idnetwork/ and search for a driver for the instrument. You should also have a programming manual for it. With the manual, you can write your own program with VISA Writes and Reads or use the Instrument I/O Assistant.

  • How to control a digital output signal using the DAQ assistant?

    I am using a USB 6251 DAQ board and would like to control a switch. I am gathering airflow, pressure, and acoustic data on the same board (analog input) and would like the switch to trigger when the airflow value is within a pre-determined range. Finally, I would like to reverse the polarity of the switch (to off) about a second after the initial digital signal, all of which is during continuous data acquisition.
    I am able to actuate the switch only when pressing the "run" button in the DAQ assistant window. I am proficient with data acquisition but have never tried programming an output... Please help!
    Thanks!
    -a troubled researcher
    P.S. I am running LabVIEW 8.5 as well.

    blsmith4,
    You probably won't get the control of the digital port on your card by only using the DAQ Assistant. One of the following examples should provide you the functionality that you would like out of the box:
    Digital - SW - Timed Output (Simple)
    Digital - Continuous Output (More Complex)
    Continuous Write Digital Port - External Clock - Non Regeneration (Most Complex)
    Let me know if these work better for you.
    Best,
    Jason M.
    Applications Engineer
    National Instruments

  • How to control two 6011e daq card to acquire eight signals simultaneously.

    I use two 6011e daq card to acquire eight signals simultaneously .I use labview function to realize it,but the data graph show that the signals aren't acquired simultaneously,why?how to do it?

    Hello;
    You need to use the RTSI bus to route one board's clock signal to be the second board's clock signal. By doing that, you will have the same signal clock timing both boards, which will make the synchronization hardware timed.
    You will need to have a RTSI cable connecting both boards together also.
    The best way to go about this is to open the Labview examples that show how to synchronize multiple devices. You can apply the same idea to your board.
    The examples can be found at Search Examples->I/O Interfaces->Data Acquisition->Multiple Device DAQ Examples.
    Hope this helps.
    Filipe

  • Using Visa "resource name" control with GPIB example

    good morning
    I have in my pc two resources of GPIB (Ni-Enet and HP-HPIB card) each one has differet VISA name (ie:GPIB0,GPIB1)
    means Ni-Enet is GPIB0 and HP-HPIB card is GPIB1.
    I tries to use the example Labview<>GPIB to communicate with GPIB1 but it failes
    because the address given (string), to the gpib write object is a string and it recognized only the GPIB0 addresses
    i tried to use the "visa resource name" control (used in the example Labview<>Serial)
    in the Labview<>GPIB example but it failed. ("visa resource name" shows all resources includes GPIB0 nad GPIB1)
    tell me pleae how to use the Labview<>GPIB example to communicate with the equipment addresses used in GPIB1
    a bit long , but hope the issue is clear enough..
    thanks in advance
    Happy new year.
    Simon

    You can't use that example with an Agilent GPIB board. The GPIB functions are only for NI boards and the NI-GPIB driver. You should be able to convert it to VISA but you'll have to replace the GPIB Writwe/Read with VISA Write/Read as well as changing the GPIB Address String to a VISA Resource Name.

  • A/C three Phase motor control using 1/4 bridge Load Cell output and a USB 9172 Daq

    NI Assistant,
    I am tasked with setting up a Motion Control using two each OMEGA LC712-100K, -50K and -10K load cells to monitor the cable tension on six A/C motor driven winches. I also need to Monitor and calculate a Moment as well as the load slope for Load verses Time.
    I have zero time to develop and I have searched your databases for existing Motor Controls to modify.
    Should I use Case Structures and then place them in a while loop?
    I setup a drawing in Word to visually define the task.
    Signed,
    Patrick Murphy
    Attachments:
    Layout for Testing Spars.docx ‏15 KB

    Hi Patrick,
    The reason why the Motion Control examples will not work for you is beacuse they are meant to be used with the NI Motion boards. Since you are using DAQ boards, the examples are probably not going to be able to help you too much. However, there is one example on the community that might be a place for you to start. 
    pmurphy wrote:  Should I use Case Structures and then place them in a while loop? 
    What exactly do you mean by this? What do you want in the case structure or while loop?

  • I'm working on DC Motor control using DAQ. There is sufficient voltage output from DAQ but not current. What should i do so as to drive the motor

    I'm working on DC Motor control using DAQ. There is sufficient voltage output from DAQ but not current. What should i do so as to drive the motor. Could you suggest me appropriate driver IC using which this problem can be solved.
    Saravanan.T

    You really should use a DC motor controller to control a DC motor, look at the 754410 IC for a good example. You should be able to interface these to most DAQ devices.
    Alan

  • 6602: How to use 8 counters simultaneously in C++ using traditional Daq for frequency measurement

    Hi Everybody;
    I'm new to Ni-DAQ cards and working on NI PCI-6602 Card in Borland C++, I should use Traditional DAQ for my project. Now I want to use all the 8 counters simultaneously for frequency measurement.
    1.Where should I connect my External signal, to source or gate, at present I have connected to source.
    2. How to set parameters and start the counters simultaneously, what are the parameters to be set for frequency measurement.
    3.How to start counting.(parameter settings)
    4.Should I set any PFI Lines or by default are they set to counters.
    status = GPCTR_Set_Application (1, gpctrNum, ND_SIMPLE_EVENT_CNT)
    status = GPCTR_Change_Parameter (1, gpctrNum, paramID, paramValue)
    iStatus = GPCTR_Watch(1, gpctrNum, ND_ARMED, entityValue);
    status = GPCTR_Watch (deviceNumber, gpctrNum,ND_COUNT, entityValue)
    what is the paramID in my case, Clear and appropriate answers would be very helpful and thanks in advance.
    Message Edited by Pavan K on 07-11-2009 12:38 AM

      I have made a program with LabVIEW 5.1 based on NI 6602, in which four counters were used.
      Counter 3 is used to generate pulses, which are directed to the gates of counter 0, 1 and 2. 
      The source terminals of counter 0,1 and 2 receive pulses, individually, to count how many pulses appear during the time interval of each gate pulse.
      The results are stored in a data file.
      In order to test its performance, only one signal of ramdom pulses is sent to counter 0,1 and 2.
      But I find that at the beginning the counts for the three counters are the same, but the following counts are totally different!
      What's wrong? And how to solve such a problem? Does it have something related with synchronization?
      Thank you very much!

  • How can I control a stepper motor drive using a DAQ card?

    I need to control a simple CW/CCW stepper motor drive using a DAQ
    card.  I simply need to output a 5 volt signal and then a drop in
    the signal, and so on 200 times or steps for 1 revolution.  I have
    desiigned the basic program, but do not know how to output the
    appropriate signal.
    Cheers,
    Matt

    What DAQ card do you have? Ideally, one with a counter output to generate the steps, where you can control frequency. If you try to start the motor too fast (acceleration or abrupt application of fast pulses) it may stall out. Search in Help/Search for Examples for 'frequency' and 'pulse' for example of frequency generation. You can also use a digital output on the DAQ card to control direction.
    If DAQ card does not have a counter, you coul do a software timed loop to toggle a digital output to generate the pulse train. It may not be fast enough nor accurate for your application, do not know from info you have given
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Newbie Question -- Simultaneous Execution for Labview/DAQ

    Hey, I am an undergrad student who is fairly new to labview and control systems and I am working on a senior project. I am wanting to use labview to simultaneously control two separate machines. Both machines would send back data to be saved to a file. They would both be connected to a NI DAQ(SC-2345). Is this reasonably attainable? Will labview and/or the DAQ have problems running two machines simultaneously? I would love any suggestions. Thanks

    Let me see if I have your setup pictured correctly.  You have 1 PC, 1 DAQ card that is connected to the SC-2345 signal conditioning carrier.  Do those modules, you have two different physical machines you want to control.  Am I correct?
    Do you want to have one LabVIEW application controlling both machines independently?  Or two different LabVIEW applications each controlling one machine?
    Your one constraint is that since there is only one DAQ card, all DAQ functions have to be handled at a single point of code otherwise you'll get errors about resource conflicts.  In other words, you can't have two separate programs eaching trying to work with a single DAQ card.
    So you can have a single point of interface with the DAQ card and use architectures such as Producer/Consumer to pass messages back and forth from your other parts of the code.  The other parts of the code can be two independent loops that handle the machine control logic for each machine.
    The easiest to program would be to have on application that handles both machines.  It would have 3 loops, two loops where each loop is for logic for each machine, and one loop that handles the DAQ communication.
    If you want to have two separate applications, you can do that as well where each application handles the machine logic and a third background application handles the DAQ communication.  It just needs a little bit more sophisticated communication scheme to pass data between the different applications.

  • Can I use my DAQ on two different computers?

    Hi there.
    Sorry if this might seem like a stupid question but I'm trying to save money lol. I have two test stations, each station has it's own computer and power supply. The power supply powers a certain device and the computer communicates with it via an USB to RS422 serial converter. I am using the 2 analog outputs on my NI-USB 6008/6009 DAQ to control the 2 power supplies. AO 0 to control the power supply on station #1 and A0 1 to control the power supply on station #2.  I can control these 2 power supplies just fine with one computer connected to my DAQ. But i need each computer to be running tests independently. I only have 1 DAQ but 2 computers, is there way to use this DAQ on both computers???
    thanks for any help!
    Don't think twice.
    Solved!
    Go to Solution.

    No.  Because there is no way you can take one USB-DAQ and plug it into two computers at the same time.
    You would probably be better off having one PC that communicates with the USB-DAQ and have your application on one computer talk to the other computer to pass commands and get back data from the USB-DAQ, probably by way of TCP/IP.
    I would actually make an application that only handled the USB-DAQ operation.  Then have the program that runs on each computer be the same and talk to the USB-DAQ application which would act like a TCP/IP server.  The program that is on one PC would call the IP address of the other PC.  The program that is on the same PC as your USB-DAQ server would just call the local host to establish communication.

  • How do I use two DAQ cards in one Labview code? Current I'm getting error " error 200558 occurred at DAQmx Create Channel.vi. One task cann't contain multiple independent devices". Can someone help me?

    The two DAQ cards are NI PCI-6070E & NI PCI-6052E. The Labview I'm using is labview 7 Express and the Window system is Window XP. I'm using NI SCXI-1000 chasis and SCXI-1102 & 1102B two modules plus a feedthrough SCXI-1180. 1102 is connected through SCXI-1349 cable to DAQ card 6052E while 1102B is connected through SCXI-1349 cable to DAQ card 6070E. SCXI-1180 is connected to 6070E through SCXI-1349 adaptor on the back of 1102B.

    Sarah, thank you for replying my question. It seems that I'm making progress everyday (smile). I'm able to run the test using both daq cards in my code now. But as I'm moving forward, I'm getting new questions too. How do I use one STOP button to control both tasks and how can I save data into one single file?
    I attached my code here hoping you can get the specifics on my application by looking at the code. Thanks very much!
    Thanks.
    Attachments:
    DAQmx_Task_Example_plus_voltage_2.vi ‏416 KB

  • How to generate digital pulses to run stepper motor in a sinusoidal motion profile using NI DAQ 6229 card

    Hi,
             I need to make a stepper motor undergo rotary oscillation with a sinusoidal motion profile. As it nears the extreme points it should decelerate and finally slow down to zero velocity and then it should reverse direction and accelerate until it reaches the other extremity where it should slow down and stop and reverse direction and repeat this motion.
            The hardware is NI DAQ 6229 and the stepper motor can be controlled using digital Hi-Low (1,0) pulses. For each high pulse(1's) the motor turns 1 step. I am able to generate a analog sine wave and convert it to digital data using Analog-to-Digital.vi  But i am not able to convert the digital data to a stream of 1's and 0's in the correct sequence to get the sinusoidal profile with the amplitude and frequency i require.
            The direction of rotation can be changed by giving a pulse to another input of the stepper motor. So only half cycle of sine wave needs to be generated and it can be replayed after changing the direction to get the full sinusoidal profile.
    Any ways of making this approach work or any new approaches to this problem would be helpful. Thank You.
    Regards,
    Prabu.
    Solved!
    Go to Solution.

    Hi,
             I finally figured out a way to do it. The analog sine wave is converted to digital and sampled. Consecutive values are compared and if the least significant bit(LSB) changes then a pulse is sent to the stepper motor to turn one step.
    I have included the sub-VI's that accomplish it for the particular stepper motor and connector block i have. The front panel of both sub-VI's are quite messy but the block diagrams should be much clearer. The sub-VI's get their inputs from a third VI which i have not included. So take a look at the VI connector panel to figure it out. Hope this helps. Kinda messy but worked out fine in the end for my application. 
    Thanks again for all the help. I appreciate it very much.
    Regards,
    Prabu Sellappan
    Graduate Student
    Aerospace and Mechanical Enggineering
    University of Southern California
    Attachments:
    start motor test waveform dtest.vi ‏73 KB
    sine profile generation subVI.vi ‏41 KB

  • Simultaneously Controlling LabVIEW Remote Front Panels not working properly

    We are trying to simultaneously control a Executable file from different PC as per the description given in link below:
    http://www.ni.com/white-paper/4867/en
    But the issue is that we are not able to view it in Web browser as in "Web Publishing tool" When we click on "Preview in Browser" it Pop up a message " Web server not started. Do you want to start it now? We Click YES. Still nothing happens.
    We have exactly followed the steps given in the "white-paper/4867/en  i.e. Selected "Enable web server" and VI Properties to "Reentrant execution".
    In Control Panel>>Administrative  Tools>> Services we found that NI Web Server is available but NI Application Server is not installed. Is this is the reason why we are not able to Preview in Browser. If yes how to install that OR any thing else we are missing?
    Thanks
    R.B.Chavan

    Mateus23 wrote:
    I'm now developing the web version in HTML 5, using web services to comunicate with my labview application.
    There you go, good solution. When doing this remember that you have access to the database on the server. A structure I have found effective is to use the server DB like a dropbox that I write to, and the web server reads from.
    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

  • Dynamic AS2 subject from XI payload

    Hi, My interface has to send data to a third party system through the Seeburger AS2 adapter. The AS2 subject has to be dynamic and depends on a particular node in the incoming message I kknow I can use dynamic configuration for setting the subject bu

  • SATA RAID Controller under Solaris 10

    I want to set up my Sun Ultra AXMP on a SATA RAID5, but i did not find yet a controller wich is supported by Solaris 10. I already looked for support on the Adaptec 2410SA and all other Adaptec Controlleres (searched here: http://www.sun.com/bigadmin

  • REG : HTTP connection

    Hi All,           I have  a file to HTTP syncronus  scenario. To test the http URL i wrote a java program and tested it standalone from my PC with method POSTand it is working fine( ie i was getting a response). However when i use the same URL in XI(

  • Dataguard and Windows XP

    Hello all, I successfully installed and configured DG in Linux environment, also installed successfully in Windows XP but in XP in EM i can't find Dataguard option under maintainance. I even tried to connect with prot 7777 . In XP Installation was su

  • Problem with KF

    Hello , can anybody help , as i want the value of kf(keyfigure) to be whole value i.e (round Figures) as i have 10.23 for the kf but i want it to be 10.So can anybody help me in this matter. Thanks PP