PCI-6221: Programming with Borland C++

Hello,
Is it possible to program the PCI-6221 analogue card with Borland C++. I get the error 'device not found' when I tried to program it. When I use MAX I can find the device and use it.
So can anybody help me?
Many thanks in advance!

Make sure you are using the NI-DAQmx API.
Also, I believe Borland isn't a supported development environment for NI-DAQmx. It may be possible to use it, but you're going to have to figure out how to make it work.
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com

Similar Messages

  • How to entirely develop an application with PCI-6221 in Borland C++ Builder V6 in DAQmx?

    Hi,
         I am sorry that I have asked a huge question.
         But the main questions I want to know is :
         1,In Borland C++ Builder 6,Which version of DAQmx is the best one we will use?  DAQmx V8 don't support BCB6.
         2,Would you please give an example source file to use *.Lib in BCB6?
         3,In other computer,not including developping environment ,which items of DAQmx we have to install,PCI Card Driver?
    Which dll?How to make the installation the smallest?
         Thanks for your possible answer.

    Why DAQmx8 doesn't support C++ Builder 6 ?
    I've just used LabVIEW with DAQmx8 create dll file for C++ builder 6. My application is to use PCI-6221 generate Analog output. ( just DAQ assistance ).It works well.  

  • How do i create 6 digital 25Hz PWM output signals with my PCI-6221 card?

    Hi!
    I´m a student, who´s trynig to control a gasturbine process for my diploma thesis. The control program should be written in LabView 8. I need to control 6 25 Hz PWM signals for the gasvalves. The  needed accuracy of the duty cycle has to be about  0.1 %.
     A  tech. engeneer from  NI  told  us , that  we can  do this by using one single digital output for each PWM.
    Now, after a while, i need to implement it into my program. But there are troubles:
    My NI-PCI-6221 standard card only has 2 couteroutputs and only the first of the 3 ports seems to be buffered (Error Nr.  201062)...
    I tried to do the programming, by manipulating the "DIO_PWM_50Hz.vi" I found in google.
    Does anyone of you have any information or helpful examples how i can create these PWM with my card, or did I get a wrong Information by the salesagent (...not the first time....)?
    Thanks for your help
    Tobi

    Here you can find an example, how to do this:
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=DE27921DB53A4D8DE034080020E74861&p_...
    As the text says, best would be to use the counter. As your Hardware has only 2 Counters, you would need additional hardware. Best would be to use a Counter-Card (660x), thes boards have up to 8 counters, so you coulkd control your 6 gasvalves indipendently.
    The soultion with the timed digital outputs of the m-series boards would only work, if you can use the same timing (one counter) for all 6 outputs.
    Hope this helps!

  • Using timer/counter with PCI-6221/USB-6210 to control timed-loop VI

    Dear all,
    I need to ask about two devices and one of their functionalities, PCI-6221 and USB-6210. For our NI-based system, we need to control some timings in a Timed-Loop vi, for that currently we are using PCI-6221 and we give external TTL signal (at 1 kHz) to it,
    recenntly we need to make some changes and for that we found USB 6210 DAQ to be more suitable, but we need to clear ourselves on some specific things.
    Can the counter/timers functions available in the either PCI 6221 or USB 6210 can be used to control the Timed-loop VI by giving external clock or by using their own internal clock source?
    Although we are using external clock with the PCI 6221 but we want to know about the usage of their internal clock, also are controlling timed-loop also possible for USB-6210
    Also... What if we use the RTOS, are they still able to control the timed-loop VI  without giving any 'EXTERNAL CLOCK' and using the internal clock sources of the DAQs
    Waiting for reply,
    Bests,
    RaJaf
    Solved!
    Go to Solution.

    Ben,
    I having read previous email which I send earlier with general overview, we discussed in more detail within our team and I am giviing the specific answers.
    Please check in RED the most recent answers. Blue are the questions/suggestions by your side.
    1.    Using Internal hardware clock of PCI-6221 would enable us get rid of external clock, but how to divert the internal hardware clock to the current settings. Any idea  (can you provide us with some reference manul for otherwise). I mean is there some flag-bit etc. or VI
    2.       Is it also meant that with the installation of RTOS the timed-loop can directly get the timing source from the internal hardware clock PCI-6221? --- How???
    3.       In order to make desktop to work as RT system, what is the hardware (motherboard, processor, etc..) requirement? What are the LabVIEW modules (specific name) that needed to be installed? Our platform is LabVIEW 8.6. (Currently we have windows-7 with i7 core processor)
    What kind of application are you intending for this system? ---- high-speed laser scanning system.
    Are you most concerned about accuracy, speed, or responsiveness? To control the laser mirror scanner to move at 1 kHz or 2 kHz speed. On the other hands, using PCI-5105 (128 MB memory) as a DAQ for real-time/on-the-fly data processing.
    Bests,
    RAJAF

  • Need help with counters on PCI 6221 (37 pin)

    Hi all,
    I have a system with a PCIe 1429 connected to a Basler A504 camera and a I use a clock generator (SRS CG635) set at 3.9 kHz to trig the image acquisition.
    On the same system I need to add a PCI 6221 37
    pin to acquire :
    - 2 AI at 39 kHz, synchronized with the image acquisition. (10 AI sample for each image)
    - 1 counter to measure a frequency
    Since the accuracy of my 3.9 kHz clock is much higher than what I have on the DAQ board, I figured a nice option would be to have a retriggerable DAQmx task that generates 10 pulses at 39 kHz for each pulse received from the clock and then use this to trigger the DAQmx AI task.
    Of course this can only work if the "trigger" sources that I define for these two tasks don't take the two counters I have on the board.
    So let's describe the DAQmx tasks :
    - here's the one that generate the 39 kHz on counter 0, from the 3.9 kHz that I input as a trig source on PFI 4
     - here is the analog input task for which I set the trigger on PFI 6.
    Question is : can I "softwarely" tell the board to route the output counter (Ctr0) to PFI 6? And if yes, how?
    Thanks in advance for any help!
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Solved!
    Go to Solution.

    Sorry, no can do on the counters.  The M-series boards would use up both counters for the task of generating a finite pulse train so there'd be no counters left for freq measurement.  From what I've read, the newer X-series boards only use 1 counter for finite pulse trains (and also have 4 total available.) 
       FWIW and for future reference, software routing of signals *will* work though there are some restrictions on which signals can be routed to where.  The M-series boards are generally very flexible though, and you can double check the routing options in MAX.  Also, in general, there's no particular problem running 2 tasks of the type you proposed simultaneously.  Note though that the term "trigger" has a more specific meaning in LabVIEW-land than it may have in normal life.  Here you were using the counter output as an "external sample clock" which is distinct from using it as a trigger.  Triggers initiate tasks, then sample clocks cause samples to be taken during them.
    Anyway, here's a possible workaround which doesn't require you to generate any counter pulses, so you can perform your freq measurement and still have a spare counter left over.
    1. Configure your AI task to use the external 3.9 kHz signal directly as its sample clock.
    2. Also configure your AI task so that the channel list contains at least 10 duplicates of each of your 2 AI channels, along the lines of "ai0,ai0,ai0,...ai1,ai1,ai1,..."   Or you could alternate them back and forth if you want.  You'll have to trade off the importance of the time difference between the two AI channels vs. the risk of the crosstalk-like effect from mux'ing back and forth on each sample.  Myself, I'd probably make a channel list with 12 dupes of ai0 followed by 12 dupes of of ai1 and later ignore the first 2 conversions on each channel just to be more sure the ADC has settled after muxing between them.
    3. Finally configure your AI task to use a specific timing for its "convert" or "channel" clock.  Since the timebase for your AI board is independent of the more accurate external 3.9 kHz clock, you should err on the side of caution.  For example, supposing you were going to take exactly 20 scans within each sample interval, I'd pick a convert clock rate that's a bit higher than the apparent minimum of 20x3.9kHz=78 kHz.  Probably something in the 80-100 kHz realm.
    -Kevin P

  • Continuity testing with a PCI 6221

    Hello, I was wondering if anyone has some advice about how to setup a continuity test using an M Series PCI 6221 DAQ and Labview 7.1. Specifically, I want to preform a testing regime similar to the IPC-SM-785 guidelines during thermo-cycling of the test vehicles. For those not familar with the guidelines, the purpose is to monitor the resistance of channels that have a DC (10V max.) current (2mA max.) running through them. If the resistance exceeds a certain threshold it is considered "an event", and if ten events happen in a specific time-frame the channel is considered to be "failed".
    I am a relative new-commer to NI DAQs and the associated software, so any advice would be greatly appreciated.

    One way of doing it is to use two analog input channels on your card. Use one to monitor the voltage the other to monitor the current. To monitor the current you will need to add a shunt resistor in series. Use Ohm's law to convert the voltage to the current. Monitor the signals and if you are at 2 ma and not at 10V you are in an error condtion. Tjis is assuming the power supply is a constant current, constant voltage source.
    Greg Bush CLAD

  • Doing simultaniusly two task with NI PCI 6221

    I am using  timer 1 configure as two-signal edge-separation measurement. I want to one of the signal witch start the counting to be taken from the same device NI PCI 6221.   I want set one of DI0 and i want to this setting started the counting. While I am setting the DI0 timer should be already configure and arm. I understand that ,this mean two task shuld be done simultaniusly. How can I do it.

    Hi Fazi,
    As I understand it, you would like to use a DIO line to start your counter task.  Start triggers for counter tasks must be set using an the arm start trigger.  Here is a great knowledgebase that talks about using arm start triggers on M Series devices such as the PCI 6221.  In addition, I have taken the Meas Two Edge Separation-Buffered-Continuous.vi example (Help » Find Examples » Hardware Input and Output » DAQmx » Counter Measurements » Two-Signal Edge-Seperation) and added an arm start trigger below.  You will need to connect the digital start trigger line to a PFI line to use it as the arm start trigger.
    I hope this helps,
    Paul C.Message Edited by Paul C. on 10-23-2007 11:06 AM
    Attachments:
    armstart.JPG ‏45 KB

  • Pci-6221 card is not recognised with DAQ

    I have installed NI DAQ 7.3 and monted a PCI-6221 and PCI-MIO 16E-4 cards. The PCI-6221 is not recognised by the software.

    The card is supported by NI-DAQmx 7.3 and should be recognised by the PC without trouble. Can Windows see the card at all?
    Check the specification of your PC's Motherboard. M-Series cards require the PCI bus to supply 3.3V, 5V & 12V. Some PCI slots may not provide these required voltages.
    Hope this helps!

  • PCI-6221 fails self-test in MAX but device manager says it's working

    Hi everyone,
    I bought a few PCI-6221 (37-pin) data acquisition cards and have been able to get one to work but 3 others don't work.
    Device Manager sees them and says they work.  MAX sees them and when I run Self Test, they fail with error number
    -50002.  Motherboards in non-working systems are PC Chips M957G and P25G.  OS is Windows XP Pro with SP2.
    I already tried uninstalling SW and the board, reinstalling SW and the
    board...autodetect etc works fine.  I even reformatted
    the HD on one of the computers and reinstalled the OS.  Anyone have any ideas?  Thanks in advance.  Halden
    [email protected]

    Thanks Tom for your suggestion to try NI-DAQ 8.0.  I just saw it today.  Yesterday,
    I was able to isolate 3 PCI-6221-37 boards as defective because they all wouldn't work in another computer while
    one other identical model card did work in that same computer.  I called to arrange to return them to NI and learned
    that for these 3, I needed NI-DAQ 8.0.  The fourth one was okay
    with NI-DAQ 7.5.  Apparently, this was a known problem. 
    I wish NI would have simply notified me that my boards would
    not work with the software sent with them and sent the NIDAQ 8.0 CD as soon as they knew rather than have me
    waste a day of my engineering time trying to figure it all out.  Booo NI.
    One of the boards has worked for almost a day under NIDAQ 8.0.  I was able to make some progress on the
    system I am building.  But then it stopped working.  LabVIEW
    (version 7.0 executable) programs would not open completely
    or would open slowly.  One that accessed the COM port only (no
    data acquisition) did work.  MAX opened very slowly or not at all
    and when I click on
    Devices and Interfaces, the hourglass is up for a long time and finally the + icon goes away indicating that MAX is not
    aware of any devices being present.  The Windows Device Manager says the board is present and working.  Windows
    Task Manager lists LabVIEW Runtime and MAX when only MAX is open and indicates that MAX is Not Responding.
    I shut down the computer, removed the PCI-6221 board, booted it up again, and MAX is the same way.  I uninstalled
    MAX and NI-DAQ LabVIEW 7.0 support and then reinstalled them.
    Now the MAX loading window is up for more than a minute and NIMAX.exe is listed in Task Manager's processes.  After
    the first minute, LabVIEW Runtime appears in the Task Manager's
    Applications list.  After a while longer, the MAX window finally
    opens
    and MAX is listed in the Applications.  I click on the + icon by Devices and Interfaces in MAX and the hourglass appears
    and Windows Task Manager says MAX is Not Responding.  Eventually, the + icon and the hourglass go away and
    the Task Manager lists LabVIEW Runtime and MAX as Running.
    I shut the computer off for several minutes, started it up again, and MAX is still takes a long, long time to open. 
    I haven't put the PCI-6221 card back in because MAX still isn't working.
    What do you suggest I do next?
    Thanks
    Halden

  • Problem with Borland Builder C++ AND NI-DAQ 6.9.3

    Hello,
    I am trying to porting a Data Acquisition application developed with Borland Builder 4.0 and NI-DAQ 6.5.1, changing data acquisition Hardware. Now I am using PCI - 6036E, with Ni driver version 6.9.3. My s.o. is Windows XP Professional.
    When I link application with nidaq32b.lib and nidex32b.lib and launch my EXE, without call any DAQ function, when I close my window PC is resetting! If I try to use Ni driver version 7.0 or 7.3, I obtain a GP fault as soon I start program.
    I think that there are problem of disallineament or other inside file EXE generated. I have tried to generate new file lib with implib utility from DLL, but with the same result.
    If anyone cannot help me, I think to substitute call to DAQ functions inside C code with DLL or EXE developed in Visual Basic.
    Can anyone give me any help for this? Is it better use VB 4.0 or VB 6.0?
    Thank you for your attention.
    Fabrizio

    Hi,
    I would definitely suggest to create the dll in VB6. There are shipping examples for VB6, so that you can see how it looks to program in VB6 with DAQ. These examples can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic.
    I hope this helps. Have a Great Day!
    George

  • High frequency quadrature decoder (NI PCI 6221)

    Hello, i would like to ask you about high frequency quadrature decoder. I am using module in DAQmx for measuring linear position. For this i am using NI PCI 6221. My problem is that i want to use this for my interferometer and we need really high speed. So I tried to use External timing whitch should be possible for this card up to 80MHz. Unfortunatelly i always will get error message that there is some kind of owerflow and my program crashes. So my question is how to get all data form this card. I know that the buffer size FIFO is only 2 so if it is impossible to get all data so i want find another solution. Is it possible let my card work alone on 80MHz and only repeatly rewrite all buffer and just sometime ask this card for sending current buffer. I dont really need all the data, but when i will ask i need to know reall position. This high speed is really necessary because my interferometer is sensitive and i dont wat to lose any steps. If there would be any possibility how to work on 80MHz and only sometime ask for sending data with position, it would be great. Sometimes i will ask not for only current position but for full buffer because i want so see what is happening during some time period, but this task will be only sometime. 

    Dear BMAJTZ,
      The counter frequency (the maximum speed available) is configured by the Task in the background. In our case, the counter is set to detect edges, so it always uses the maximum speed available. If an edge occurs, the count value increases by 1, and this accumulated count value (stored as a binary number) is read by the DAQmx Read VI, and converted to meters. So if your encoder input is slow enough for the 80 MHz card to handle, you won't miss any ticks, even if you only read the value occasionally.
    You can find further information about counters and encoders on these links:
    http://www.ni.com/academic/students/learnlabview/digital.htm
    http://www.ni.com/white-paper/7109/en
     Also if you can tell me the approximate frequency of your encoder signal, and how often you nedd the position info, I can do some benchmarking for you to see if your card is capable of the task.
    Best regards:
    Andrew Valko
    National Instruments
    Andrew Valko
    National Instruments Hungary

  • Dose PCI-6221 support NI-Traditioanl DAQ?

    When I installed the PCI-6221 (M serials) multifunction card by the MAX, I found it only existed in the DAQmx group but nothing in the traditional NI-DAQ group. How can I use the traditional NI-DAQ Api with this card?

    Hello,
    I recommend you to use NI-DAQmx because it's much easier to program your board.
    You can download Traditional NI-DAQ Compatibility VIs from our website. The Traditional NI-DAQ Compatibility VIs allow you to run LabVIEW applications written in Traditional NI-DAQ on devices that are only supported by NI-DAQmx. There are some functionality restrictions and you must have LV 7.0 or later. Please read the description carefully.
    http://digital.ni.com/softlib.nsf/954feaeea92d90918625674b00658b83/9d67f671bcc6850586256e630059308b?OpenDocument
    Hope this helps.
    Regards,
    Luca

  • How can I configure NI PCI 6221 and DAQ SCB-68 for pressure sensors?

    Hello
    everybody,
    I am using the measuring board (NI PCI 6221) and DAQ
    SCB-68 for the data acquisition.
    With the DAQ-Assistant I created AI for the voltage of
    pressure sensors. In a big indicator panel from this DAQ-Assistant I see the
    voltage for both sensors in the correct size. But if I set sensors in the
    blockdiagramm to control the signals for sensor one I get a wrong voltage size
    and for sensor 2 nothing.
    How can I configure this data acquisition equipment to
    get the correct signals?
    Thanks a lot for your help.

    I do not know the type of sensor you are using. But pressure transducers may have a very low output voltage(in the mVolt range). They also need an excitation voltage. Here is an introduction. http://focus.ti.com.cn/cn/lit/an/sloa034/sloa034.pdfThen working with pressure sensors I always use 3 stages in the circuit.
    1 Instrumentation Amplifier as a preamp
    2 filterstage
    3 Final amp and output buffer
    (you may combine stage 2 and 3)
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Using NI-DAQ with Borland C++ 5.01

    Hi,
    I've got a problem using Ni-DAQ with Borland C++ 5.01 (i know this section is for visual C++ but I couldm't find any for ANSI C++). If I write a simple program with one of the libraries included in nidaq.h and if i specify the correct lib and include locations I have a problem with the linkink process; in particular it says that the function can be resolved...
    If anyone can help me I would appreciate it. Thanx
    Optoclasfo

    Hey optoclasfo,
    I haven't used Borland much, but with Visual C++ the problem normally
    happens because the lib and include paths are not added to the
    project. For Visual C++ they are stored at
    Tools->Options->Directories. If the library files (*.lib) are not
    added to the project you can get this error as well.
    I hope this helps out.
    Joshua P.
    Application Engineering
    National Instruments

  • How to use scb 68(pci 6221) for voltage and current measurement

    hi 

    PCI 6221 is DAQ card with 68 terminals and SCB (Shielded Connector Board) 68 is termination board to those 68 pins of 6221 card, so that you can connect signals (to be measured) to appropriate pin of PCI 6221. You might already aware of it.
    Refer to the pin out of PCI 6221 to check which is the correct terminal, for voltage measurements.
    You cannot measure current directly, instead use a resistor of known value (and appropriate current rating), let current (to be measured) flow through it and measure the voltage across that resistor.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

Maybe you are looking for