Reading PCI-6023E counter by Delphi/NI-DAQ

One current goal of mine is to read out the counter of a NI I/O board PCI-6023E by Delphi/NI-DAQ! But I don't get it work.
I am interested in having a Delphi code using NI-DAQ commands *without ActiveX components*. At NI support doesn't exist yet any example code in Delphi using NI-DAQ just commands.
What part is missing in my code "PCI6023E_Counter.pas"?
http://www.home.fh-karlsruhe.de/~egra0011/Projects/SIM
The "same" prog in VB works fine! Do the NI-DAQ commands/drivers work with Delphi? Thanks.

Rawi,
NI-DAQ provides a function prototype for Borland Delphi, so NI-DAQ function calls should work fine in that environment. Your program seems to be correct. However, you don't state why it's not working, and I've noticed that you don't seem to be checking the iStatus return value for an NI-DAQ error. You might want to check to see if an error is being returned. That could point you in the right direction. If you continue to have problems, I would recommend contacting National Instruments support for troubleshooting assistance.
Also, the counter/timer developer exchange is targeted towards 660X and TIO-10 counter/timer products. The PCI-6023E is a multifunction I/O board, and in the future, you may want to consider posting your inquiries to the multifuncti
on I/O exchange for assistance.
Regards,
Erin

Similar Messages

  • Reading PCI-6023 counter by Delphi/NI-DAQ

    One current goal of mine is to read the counter of an NI I/O board PCI-6023E by Delphi using NI-DAQ driver commands. For Delphi/NI-DAQ *without ActiveX* don't exist any NI examples yet. In VB works the "same" prog fine.
    http://www.home.fh-karlsruhe.de/~egra0011/Projects/SIM
    What part is in my code "PCI6023E_Counter.pas" missing? Are the NI-DAQ commands/driver working with Delphi?
    Thanks.

    I am not familiar with Delphi syntax, but you are using the correct NI-DAQ functions and in the correct order. Make sure you are connecting your digital pulse to the correct pin. You should be connecting the signal to the Source of the specified counter. You are using Counter 1, so that should correspond to pin 37 of the PCI-6023E.
    Also, the count value returned is not going to be meaningful until your signal has pulsed so that the count will increment. It would be more useful to call the GPCTR_Watch in a loop to see if the count is incrementing when it sees new pulses.
    In general, if you are interested in making NI-DAQ function calls instead of using Active X in Delphi, run NI-DAQ Setup and install the Borland C examples. The syntax will be different, but t
    he NI-DAQ function calls and programming structures will be the same for your own Delphi code.
    Raecine Meza
    National Instruments
    http://www.ni.com/ask

  • PCI-6023E DAQ card maximum sampling frequency

    Hello
    I am using PCI-6023E DAQ card in pc-based ETS solution (and writing appilication in LabView 7.1 with RT module). The card has 200kS/s maximum sampling frequency, but it can be set for much higher sampling frequencies and the waveform acquired appears to be correct (i.e. i've tried setting it fo 1MS/s and sampling 400kHz sine, which is obviously above Nyquist frequency for 200kS/s card, but on spectral graph, main peak is at 400kHz). Is the card driver doing some kind of free/coherent sampling?
    Moreover, when sampling frequency is set to 200kS/s, the card seems to be doing same thing - i.e. for 200kS/s and sample block size of 200kS, graph should be updated once in a second, but it's updating slighty slower.
    I'd really appreciate if someone could explain me (or gave me a link to materials) what exactly is happening here? Is driver doing some background work, or maybe it is problem with network latency/unstability ? What is the impact of this effect on real-time aquisition?
    Thanks in advance
    Jan Kienig

    Since the fundemental is 4 times the nyquist, then what you are measuring is an alias of the fundemental. This works well as long as the fundemental is a repetitive signal. Sampling every other peak and every other node looks the same as sampling every peak and node. Tektronix exploited this on their 7S series sampling heads. Another use of this phenomena is the effective demodulation of high frequency signals as long as the bandwidth meets nyquist. As with your card, if the input amplifier supported it, I could extract modulation information from a 500 MHz signal so long as the the bandwith of that modulation did not exceed 100 kHz.
    Parker

  • NI-DAQ PCI-6023E nt embedded component

    Hi all
    I am trying to develop a KDF component for a ni-daq pci-6023e card and when
    I create the registy some keys stay in the CurrentControlSet instead of
    being related to ControlSet001. Can anyone help me???
    Is there a solution to this problem or a different approach I can use???
    Does anyone know if Nationnal Instruments have kdf file created???
    Many Thanks!
    Rémi Gauvin
    MC Countermeasures Inc.

    Hi Rimi,
    While searching for a possible solution to your question, I came across a Knowledgebase entry on our web site. Its ID is 251BSUKN. Although PCI-6023 is not specififcally included there, taking a look at it might provide you some good insight into the problem. Also in this knowledge base, you will find an attachment of the kdf files. Please do take a look at the tutorial under the related links too. To access the knowledgebase, go to ni.com/support and type this knowledgebase ID in the search box at the bottom of the page.
    I hope this helps.
    Sincerely,
    Sastry Vadlamani
    Applications Engineer
    National Instruments

  • Alternative to PCI-6023E + PCI-6602

    Hello,
    I am already using a system to acquire 16 analog inputs data (at 50Hz) and 100Hz PWM signals (counters) and to send 100Hz PWM signals to external devices. Because it deals with 12 concurrent counters I bought 2 x PCI-6602 counter boards on top of a PCI-6023E for the 16 analog inputs (through a SC2345 box). This works all well.
    I now have to build a simplified and portable solution that has to run on a laptop. I was thinking about a DAQ-6036E or DAQ-6024E (or even DAQ-6062E) and keep a SC2345 but do not know if I will get the same functionalities particularly for the PWM counting (in and out). I have to be able to count the high edge of the square signal at 100Hz while acquiring my analog inputs; also be able to generate those 100Hz signals. Will I be able to connect my counter in and counter out (one of each) to the SC2345 to do that?
    Thanks for your comments,
    Christophe

    Hello Christ0phe,
    Looking at your current specifications and hardware, the best suitable solution for a portable appication with >2 counters would be the Compact RIO Platform.
    As this is an FPGA based platform, you can implement (theoretically) as much counters for PWM generation and reading as you want.
    As you are an existing DAQ user, you will not be able to reuse your existing code.  The cRIO platform uses the NI-RIO driver which is using some different program logic than the NI-DAQmx driver.
    Why is the Compact RIO platform the best solution?
    Well, the cRIO chassis can be powered by a simply DC power supply. Depending which chassis this is between 9 and 30 VDC.
    The cRIO platform also has a dedicated controller inside which will run your LabVIEW code.  The PWM logic itself can run on the FPGA integrated in the cRIO chassis.
    So, the laptop will not be use for any calculation, only for monitoring and control of your application.
    If you want to stay with the NI DAQ plaform I see two other portable solutions:
    The first one is to make the swtich to the PXI platform.
    There is a small chassis (PXI-1033) which has an integrated MXI-interface. Using MXI technology, you can control a PXI chassis from another PC, including a laptop (using ExpressCard, not PCMCIA).
    For the PXI platform you can use identical or similar DAQ boards as you have now, reusing your existing LabVIEW code.
    Drawback of the PXI-1033 is that it can only be powered by 230VAC, you will have to provide a DC-to 230VAC converter yourself to be able to use it in the field.
    For your information. It's becoming harder and harder to find laptops with PCMCIA slots, ExpressCard is the successor available on most new laptops.
    But please have a look at following article concerning laptop compatibility: http://zone.ni.com/devzone/cda/tut/p/id/5035
    A last solution is to use the cDAQ plaform.
    Again a fully portable DAQ solution, but as it uses the same technology as the 'normal' DAQ boards, it only has 2 counters on board.
    As your PWM speeds are quite slow, it may although be possible to use this platform for multiple PWM signal generation and reading.  All will depend on the desired PWM accuracy (resolution) and if they all share the same signal period.
    It is possible to use the 2 on-board counters as a known sample clock to generate and read the PWM pulses using correlated DIO.
    Correlated DIO means that your digital input and output signals are hardware clocked (synchronized with other available clock source). On the cDAQ platform, your I/O modules must be placed in slot 1-4 of the cDAQ chassis to be able to use correlated DIO.  Possible I/O modules are in the C-series 940x range.
    Drawback: all your calculations have to be done on the fly in LabVIEW.  You will need to write code to generate an array
    of digital waveform data, then output it using hardware timed DIO
    synchronized to generate counter clock.  For the readout of the PWM signal, you will have to count (within the LV application) the number of tick (of pulses) of the sample clock during which the PWM signal was 'high' and calculate based on the known timing information the PWM on-time, period (and if needed duty cycle). 
    More info about cDAQ and Correlated DIO:
    NI-DAQmx: Correlated Digital I/O with NI CompactDAQ and LabVIEW
    Can I Use Different Sample Clocks for Correlated DI and DO?
    Some examples exist:
    CompactDAQ - Generating More Than 2 Pulse Trains
    NI-DAQmx: Digital Channel Pulse Width Modulation (PWM)
    This info should already help you make a selection.
    But please contact you local National Instruments office if you need more information.
    Best regards,
    Best regards,
    Joeri
    National Instruments
    Applications Engineering
    http://www.ni.com/ask
    Make our forums great:
    If you like the answer, don't forget to "Kudos!".
    "Accept the Solution" if your question is answered!

  • Can PCI-6023E support hardware Analog trigger

    I try to use the PCI-6023E to do the hardware analog triggering, but it gives me the Error-10403 while I test with the vi example, Aiacquires N Scans Analog Hardware Trig.vi. Is there any way for this board to do the hardware triggering?

    Jack,
    The PCI-6023E DAQ board only supports digital triggering. You can check all the features of this board in the Data Sheet and Specifications on the Catalog page (see link below)
    2002 Catalog - PCI-6023E
    http://sine.ni.com/apps/we/nioc.vp?cid=1063〈=US
    If you need to perform analog triggering, you have three options:
    1) You can simulate it by acquiring continuosly all the signals that you want to monitor including the one that acts as the analog trigger. Compare the value read from this last one with the boundary that is supposed to trigger the acquisition, and when the value read reaches this boundary, you can save or display the data from all your channels.
    2) You could implement an external circuit that will compare the analog trigger signa
    l with the boundary value, and when they coincide, will generate a digital pulse that you can use as a digital trigger. This option optimizes your CPU usage.
    You can find detail information on how to set up the digital trigger in Chapter 4>>Timing Connections of the User Manual linked below.
    6023E/6024E/6025E User Manual
    http://digital.ni.com/manuals.nsf/websearch/0C88F40FFE7F28CD862569AE00574AC1?OpenDocument&node=132100_US
    3) Finally, you could get one of our boards that supports analog triggering. The PCI-MIO-16E-4 board has similar specifications that the PCI-6023E, and it has some additional features as well. See link below for more information.
    2002 Catalog - PCI-MIO-16E-4
    http://sine.ni.com/apps/we/nioc.vp?lang=US&cid=10795
    Good luck with your application,
    Claudia Lorente
    Applications Engineer
    National Instruments

  • Error 10401 - PCI 6023E

    Hello everyone,
    I have a LabView code running on LabView 6.1 (on Windows 2000).  It has a PCI 6023E DAQ card.
    Everything was working fine for many days, until suddenly today I got the Error 10401 - occured at AO Single update.
    if I click OK, the code tries to run then displays the same error again and again.   I have attached the LabView code. 
    I checked in NI-MAX, and the device is located there as (Dev1), and seems to be fine.  I also tried restarting the computer but still get the same error.
    What might be the problem?  Any help is appreciated.  Thanks.
    Attachments:
    Lion_Rail_Pressure_Control.vi ‏92 KB

    Hi nithyan2,
    I believe that you are using Traditional DAQ drivers, please take a look to this article.
    Best,
    Carmen C.

  • Sound triggering on PCI-6023E

    I am using a PCI-6023E card. I wish to use a sound signal to trigger the data acquisition. Since it has only external digital triggering, my best guess is to run a sub-VI that reads the microphone channel and then sends a digital output to the external trigger channel. Any better suggestions? Any comments on the brain-drain effects of this on my buffered data (while waiting for the trigger event)?
    thanks

    Hello,
    Depending on the level of the sound signal that you will be receiving, doing an analog input and then in software determining if the level if your signal is high enough would be your best option if the sound signal you are receiving is not a TTL signal. But, as far as then generating a digital output that then triggers the analog input externally doesn't seem to be needed. If you are producing a software signal to trigger something anyway, you may as well just start the analog acquisition in software once your subvi has determined it is time instead of generating a digital output that then hardware triggers the acquisition.
    Regards,
    Steven B.
    National Instruments

  • Labview doesn't recoginze the PCI-6023E card

    Hi there,
      I have labview 7 installed in a windows 7 32 bit system. I just have a PCI-6023E card installed and the windows device manager said that device is ready to use. I am trying to install the driver on the CD but NI just fail to recognize that card

    Hi dragondriver,
    AG@Amfax is right, this LabVIEW version is not supported in Windows 7. The oldest supported version is LabVIEW 2009 SP1. Please take a look to this compatibility chart.
    Once you have a compatible LabVIEW installed in the OS, you'll need a compatible driver version. Please refer to this link.
    Best,
    Carmen C.

  • DMA transfer rate for PCI-6602 counter/timer

    I'm strongly interested in raising the DMA transfer rate between the PCI-6602 counter and computer. At the moment, I've got a Pen-4 2.4GHz operating under Win98. I have to move an 80 Megaword array at an ~5 MHz speed. So far, I've been able to reach just 2 MHz. Would it be possible? What is the battleneck here - the soft- or hardware?

    Hello,
    I think the bottleneck you are seeing here is a limitation of the dma transfer capabilities that is dependant on the bus of your PC and not your 6602 card. Here is a link of a knowledgebase that you could try to use to see if that would improve your transfer rates. I still doubt you will be able to achieve approximately 5MHz.
    http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/1b64310fae9007c086256a1d006d9bbf?OpenDocument
    Regards,
    Steven B.

  • PCI-6023E sous Qnx

    Comment interfacer une carte PCI (6023E) sous QnX et plus précisément lancer l'acquisition de la carte ?

    Greetings,
    The links below will help you to start the communication with your card. The NI Measurement Hardware Driver Development Kit (DDK) provides development tools and a register-level programming interface for the development of custom driver software. You will find a lot more information in the links.
    http://digital.ni.com/public.nsf/websearch/E225B21F9710648C86256E4100350F16?OpenDocument
    http://digital.ni.com/express.nsf/bycode/exyv4w?opendocument〈=en&node=seminar_US
    Attached is a zip file of daq examples donated by a QNX customer. No one at NI has tested these examples and we make no claim regarding their quality. Hopefully they will help you setting up your communication.
    Regards,
    Wouter
    NI
    Attachments:
    Codes for QNX.zip ‏75 KB

  • PCI-6023E maximum working voltage2

    Thanks Mr. Alan A
    I am "434343" memeber.
    I recive your response to my question about "Max input voltage of PCI-6023E" .But I have some questions.
    According to the "Data Acquistion Specification- a Glossary by Richard House" ( Application Note 092):
    "Maximum Working Voltage (signal+common mode)= the highest voltage level that can be input to board without saturating the input."
    And according to your response:
    "measuring a signal with higher common mode voltage than that(11V) might not accurate"
    But in may experiment with a potentiometer (floating differntial source with (-)13.5V and (+) 5to22V),I could successfully measure the signal without saturating and without error (Max error is about +/- 0.02 volt)!!
    I think that the maximum working voltage of PCI-6023E is greater then 11 volt??!!
    or my measurement has a little error.
    I think that I don't need to use a signal conditioning circuit.
    Please Help me.
    Thans again.
    Edward Hb.

    Please see this thread.
    -Alan A.

  • Reading PCI-6071E off by ~.15 volts

    I'm developing a DOS real mode driver for a PCI-6071E card. I've followed the examples in the PCI E Series RLPM and the DAQ-STC TRM, and I can read all 64 AI channels OK. I noticed, however, the readings are off by ~.15 volts (both negative and positive). I ran the NI DAQ software (under Windows 95) to see if it read the same values, but it read the voltage correctly. Surprisingly, after running NI-DAQ and restarting the Win95 machine in the DOS mode, my driver reads the values correctly as well! I assume this means the NI-DAQ did something to the PCI-6071E that I'm not doing in my driver. After power cycling the PC and running my driver again (without running NI-DAQ), the readings are off by ~.15 volts again. I looked through all yo
    ur documentation, but can't find a missing programming step. Do you have any ideas?

    Ray,
    It sounds as though the board is not being initialized properly. More than likely, the calibration constants are not being loaded. You can refer to Chapter 5 of the RLPM to learn more about the Calibration DACs on your device.
    Regards,
    Erin

  • PCI-6023E Boards calibrated at NI are not updated & listed in print calibrated document

    PCI-6023E boards calibrated at NI are not updated in my devices- print calibration records.
    Lee Bohot
    713-254-4825
    [email protected]

    I am refering to the NI website-MyNI/My Registered Products/On-line Calibration Certificates. When I enter a PCI-6023E serial number that has been recalibrated in Jan. '03 by NI, the web site says the device is out of calibration, but I have received a new calibration data sheet for the latest calibration. Will this new calibration be reflected in the web site?
    Thank you,
    Lee Bohot
    Lee Bohot
    713-254-4825
    [email protected]

  • PCI-6023E & digital output

    Hello,
    I have a PCI-6023E and I want to generate a continous pulse train with a digital output line, and I need to know the maximum frequency for this pulse train that I can generate.
    Thanks a lot for your answer.
    Regards, Anacelia

    Hi Anacelia,
    You should not realy on this answer without verifying with NI first. So here goes.
    Page 347 of the catalog indicates the supported data transfer mode is "programed I/O". This indicates that each line state change must be initiated by an operation of the controlling software. Therefore, the upper frequency limit is determined by how often the code that sets or resets the line runs.
    So, the upper limit is determined by the software and the environment it is running in. If you are woring in Windows environment, and your machine is faster than about 400 Mhz then there are two factors to concider when answering your question. How fast does the code run, and how deterministic is it.
    If determinism is not an issue, you could resonably expect to get
    about one update every 10ms if the code is clean. This would give you 100 update per second or about 50Hz.
    If determinism is required, and you are not running in a Real Time environment, the above estimates should be backed off. Anything above 5-10Hz is going to be questionable.
    Like I said, verify what I have said with NI.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • N96 No longer connects to PC

    Hi guys. I seem to be having a weird problem. This started after I updated my N96 to the latest firmware 20.050. Before then I could connect to the PC with the standard Nokia cable (CA-101) but now after ther update the phone doesn't connect to the P

  • System copy for ABAP+JAVA system using SAPINST method

    Dear support, We have recently upgraded to ECC 6.0 system and we have been still doing system copy by using backup and restore method. I know its<b> wrong</b>. which involves below steps , this old methos works fine for ABAP engine and evreything loo

  • Disc drive makes strange noises

    I just got my macbook and from the very start whenever I insert a disc it makes a noise like its popping and breaking internally. the disc will play fine, but the sound is SO wrong that its worrying me. Has anyone else had this problem? Was it just s

  • My Videos are flipping as I stroll up and down the page

    Hello! FireFox... I would like to know if someone can please help me solve this problem. I'm experiencing this problem only on blogger and Word-press with my videos flipping when I scroll up and down the page. This don't occur when I use yahoo videos

  • IDOC - Delivery note

    Hi All, there is a scenario, whenever a delivery note is created an IDOC has to be generated and the data is sent to the third party customer using XI. Message control method is used for the creation of the idoc with the standard output type 'LAVA'.