Controlling Counter Timer of PCI6259 from Matlab

Hi,
My Name is Abtin, Im from Germany and i Hope my English is good enough to discribe my Problem. Im using a PCI 6259 Card, and I want to set the general Purpose Counter and Timer from Matlab. But I still dont manage it. have sombody experience with this card and could help me. Im really in trouble i hope somebody answere....
I want to set the Timer as output and use it for triggerung. But how can i access to the Counter??? I dont find no example for Matlab.
Regrads,
Abtin

Hello Abtin,
since you are from Germany i may as well continue in German. NI Hardware kann von Matlab aus mittels der Toolbox angesprochen werden. Unter folgenden Link findet sich eine Kompatibilitätsliste:
http://www.mathworks.com/products/daq/supportedio14005.html 
Dort findet sich auch folgender Hinweis:
"Note: Data Acquisition Toolbox supports voltage
measurements on analog input and analog output subsystems. On digital
I/O, it provides static acquisition and control. If using specialized
analog measurement capabilities (such as thermocouple CJC compensation
and IEPE excitation), hardware clocked digital I/O, or the
counter/timer subsystem are valuable to you, please let us know by
completing the form at the bottom of this page"
Nach meinem Wissensstand unterstüzt Mathworks die Counter Funktionen lediglich für einige E-Serien Karten und noch nicht für M-Serien Karten.
Ein Beispeil für MIO Karten unter Matlab findet sich unter folgendem Link:
http://webscripts.softpedia.com/script/Scientific-Engineering-Ruby/Test-and-Measurement/Counter-Example-36128.html 
Um die Counterfunktionalität der Karte dennoch nutzen zu können, ist es möglich die DAQmx Treiber dlls auch direkt aufzurufen. 
Um dazu eine Hilfestellung zu erhalten währe es sinnvoll bei der Installation des DAQmx Treibers die C-Unterstützung zu aktivieren. Dadurch werden sowohl die C Beispiele als auch die Hilfe zu den DAQmx Funktionen installiert. Unter "Start>Programme>National Instruments>NI DAQ>NI DAQmx C Reference Help" kann die Hilfe aufgerufen werden. Sie ist als Basis für die dll Aufrufe in Matlab zu sehen. 
Viele Grüsse
Wetzer 

Similar Messages

  • Control VI from Matlab

    I need to control a VI from Matlab (Simulink).
    The VI controls the operation of digital cameras, which I would like to trigger from Simulink.
    I just need to send a signal to trigger the cameras, but this should be relatively fast.
    What's the best way to accomplish this?
    The VI and the Simulink model are on different computers on the same network.
    Thank you for your help.

    Hello
    I propose to use the ActiveX automation server. From Matlab is is very easy to call executable vi and make it do what you want. It is stable, fast and easy.
    useful commands are (just coppied from my code - hope you can follow):
    If you test it through the development environment you use:
    LVapp = actxserver('Labview.Application');
    if it is executable you use:
    LVapp = actxserver('Your_App.Application');
    %call your vi in to memory
    viPath = 'Your_top_vi.vi';
    vi = LVapp.GetVIReference(viPath) ; % 'Load the vi into memory
    % 0 - invisible, 1 - visible
    %vi.FPWinOpen = 0;
    vi.FPWinOpen = 1;
    %if you want to set control values you use:
    invoke(vi,'SetControlValue','Your_Control_Label','Your_value');
    % if you want to execute the vi you use:
    vi.Run;
    Hope it helps
    Pawel

  • Accessing the DAQ-700's internal clock from MATLAB

    I am trying to use MATLAB's data aquisition toolbox to output arbitrary waveforms to a DAQ-700 card. How can I access the timers on the card from MATLAB? In what way can I exercise precise control over the frequency of the output using the internal timer?

    Hello;
    Since you are using the MATLAB toolbox, you will need to get that information from MathWorks. By using that toolbox, you are accessing a DAQ driver that was developed by Mathworks and are only using National Instruments hardware.
    Sorry if I couldn't be of more help at this time.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Counter/Timer Waveform

    I would like to convert period measurements (RPM data) received from my counter/timer board into waveform data type so that I would be able to conduct frequency analysis on the data (e.g. FFT). Have tried with limited success interpolation & decimation techniques. Would be grateful for any suggestions.

    Malfesto,
    I had a look and can offer up a few comments:
    1. I don't understand your comment about "truncation error" in the slow speed pulses case. Perhaps your are remarking about the "glitches" in the slow data embedded in the block diagram array? More on this a bit later...
    2. At least at a quick glance, the interpolation seems a little funky. I didn't spend a ton of time wrapping my head around it so maybe it's actually ok, but I saw a finite difference that would act like a derivative of the period, and a scaling factor based on the average period -- things that make me go hmmmm.
    Also, if you zoom on the graphs for the Slow Data, you can kinda see that the "Post Processing Graph" looks like a derivative of the "Pre Processing Graph". I suspect you need to rework your interpolation method.
    3. When I did a similar project, I think I first converted all the periods to frequencies and also generated a "sample time" array that was the cumulative sum of the periods. (I toyed with tweaking the time array so that the timestamp would correspond to the midpoint of the interval that I had converted to a frequency. I don't recall now whether that tweak proved useful enough to bother with).
    Once I had laid out arrays for frequencies and (unequally-spaced) sample times for those frequencies, I could generate an equally-spaced time array at a desired "virtual sampling rate" and interpolate to create new "virtual frequency" values. Since I was merely post-processing data, I think I also used the native LabVIEW array functions 'Threshold 1D Array' and 'Interpolate 1D Array' in the interpolation process.
    Now, before going into an FFT you'll want to remove the huge DC offset. This may be as simple as subtracting the mean or median frequency from all entries if you are nominally at constant speed.
    4. Your raw dataset for Slow Data has suspiciously periodic glitches in the periods. There is a very strong and dominating pattern that repeats every 16 intervals. Your typical period is registering about 10 million timebase cycles. However, in every set of 16 periods, you get one period around 27 million and another around 35 million.
    I don't know how you gathered your "Slow Data" values, but there seems to be a systemic error in the measurement. That sort of one-sample discrepancy looks very suspicious. I'd urge you to determine the source of those glitches and try to eliminate them. They don't appear to be telling the truth about the motion you wish to characterize. The device you measure doesn't by chance start and stop or go back-and-forth during your measurement, does it?
    Hope this helps.
    -Kevin P.

  • Issue with webservice data control while invokin bpel process from ADF side

    Hello Experts,
    we are creating webservice data control to invoke bpel process from ADF side.
    When I run the application and inovoke the bpel every thing is working fine.
    But when we are changeing the instances from DEV to SIT the bpel url(hostname and port) will change.
    So we just edited DataControls.dcx file and we just replaced the wsdl url and trying to run the applicaiton.
    This time the applicaiton is not invoking the bpel process.
    If I remove the webservice data control and recreate it with new WSDL url then it is working fine.
    Can any one tell us what the exact issue is. Is there any other files do i need to modify or etc.
    Thanks & Regards
    Gayaz

    DataControls.dcx & connections.xml (.adf/META-INF)

  • Counter/Timer Pulse Train generation

    Hello,
    I am having some trouble understanding why a particular VI I have isnt working(upper part of image below), I was wondering if someone could give me an idea of the cause from the error message.  I have a counter/timer which I am using to generate a pulse train.  It works fine on 'Continuous samples'  but when I switch it to 'finite samples' I get a 'resource is reserved' error when it gets to the DAQmx 'Play' VI
    I made a separate VI (lower part of image) and it works just fine with finite samples.  So  I am basically wondering what is different about finite versus continous sampling which could cause a resource to be reserved or not. (the board is a PXI 6281 if that matters)
    Thanks,
    Adam
    Solved!
    Go to Solution.

    You're correct on what the problem is. 
    For what it's worth, the newer X Series boards (63xx) and 2nd Generation Compact DAQ Chassis don't require the use of two counters for finite pulse generation (although technically there is a paired internal counter to accomplish the finite pulse generation, it's not really evident to the user). These products also have 4 counters available instead of 2. 
    Best Regards,
    John Passiak

  • I have a 17" computer, and I'dlike to use the entire screen to view, but in order to do so, I have to press Control + several times at each site.

    I have a 17" computer, and I'dlike to use the entire screen to view, but in order to do so, I have to press Control + several times at each site. I don't want to use "full screen."
    Does anyone know how to set a default to maximize the screen? For some reason, the screen appears even smaller than my old 15" computer.

    Yes, it's a hassle to zoom every single site manually. You can "zoom" all sites using this add-on: [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint]. After setting your Global zoom level, you can still fine-tune the zoom on individual sites.
    After installing NoSquint, click the % on the Add-on Bar to call up site preferences, then click the Global Settings button, then the Zooming tab.
    If you don't have the Add-on Bar displayed, you can right-click the new tab button ("+") or a blank area of the tab bar to the right of it and choose Add-on Bar from the shortcut menu.
    You can experiment with sizes larger than 125%, but I wouldn't go much higher than 150% unless you have a large high-resolution monitor.
    If there are particular sites that still present a problem, feel free to post their URLs.

  • Mounting 3 pairs of omron sensor E3X-F21 at 25mm intervals to measure time taken by moving object breaking beams and connecting to 6601 counter/timer card

    System is Windows ME Labview 6.1 6601 Counter/timer card. 3 pairs of Omron Photoelectric sensors E3X-F21 are mounted on a flat surface and as the object passes the first pair of sensors it starts timer1 and timer2.
    As the object passes the second pair of sensors it stops timer1 and as the object passes the third pair of sensors it stops timer2
    We have a known distance between the sensors so we are able to calculate the objects speed and position.
    We need a wiring diagram to connect the sensors to the 6601 card.

    I think I can describe a method that'll probably be simpler than the previous answer because it won't require any external logic circuitry.
    1. Configure two counters for "Two-Edge Separation" measurement, let's say counters 0 and 1.
    2. Wire Sensor 1's signal to both AUX-0 and AUX-1.
    3. Wire Sensor 2's signal to GATE-0.
    4. Wire Sensor 3's signal to GATE-1.
    5. Wire each sensors' 'ground' to the appropriate ground pins on your terminal block.
    6. Software configure both counters to use "max internal timebase" for a source -- 20 MHz for the 6601.
    You can specify the polarity of the transition you care about for both the AUX and the GATE signal, but I'll explain in terms of rising edges for both.
    Counter 0 will count time from Sensor 1's rising e
    dge until Sensor 2's rising edge. Counter 1 will count time from Sensor 1's rising edge until Sensor 3's rising edge. The count values will be in units of "# of 20 MHz cycles elapsed."
    You can probably get a decent starting point on the software using one of the shipped examples.

  • Datafiles, logfiles, control files, etc. not deleted from OS

    Hello,
    I used the Database Configuration Assistant to create a database(v9.2) and at a later time deleted the database also using the DBCA. Why aren't the datafiles, control files, logfiles, etc. deleted from the Windows OS files. Doesn't the DBCA delete most of the files associated with the database being deleted. Do I have to restart the Windows OS for the deletion of the OS files to take effect. Thank you in advance.

    the Windows OS files. Doesn't the DBCA delete most
    of the files associated with the database being
    deleted. Do I have to restart the Windows OS for the
    deletion of the OS files to take effect. Thank you
    in advance.Yes, the DBCA is supposed to remove the various files. It sounds like an ownership/permissions problem.

  • Low profile counter/timer board

    Does NI (or anyone else) make a low-profile counter/timer board? Perhaps with specs similar to 6602? If not, are there some other options that I could look into (I think the sample rates may be too high to use USB)?
    Solved!
    Go to Solution.

    Hi greatgrandpadog,
    Unfortunately, NI does not have any counter/timer solutions that are low-profile on PCI.
    Our cDAQ-9171 single slot USB chassis has four 32-bit counter/timers that can use an onboard 80 MHz clock (detailed specifications).  For external signals, you would need to use one of our digital i/o module which have various specifications.  You can find a list of them here.  This will be the best way to go for a compact USB counter/timer.  If you have additional i/o, take a look at our CompactDAQ Advisor, where you can use a 4- or 8-slot chassis to expand your i/o in a single system.  For more sophisticated control, CompactRIO offers a similar platform but with FPGA and Real-Time for greater customization and reliability.  There is an online advisor for that as well, here.
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • How to count time precisely?

    I was trying to count time using a VI like the one attached.
    My trouble is that this is not couting correctly. There is a possible reason I observed. 
    Maybe the computer is not able to process the VI as fast as necessary. 
    I thought about this because, when in edition mode the time counting was very wrong, and, when I created an aplication and installed it, it was running ok, as it got "light". But today, when I tryed to use this aplication with an old computer it didn't work. The clock is delaying.
    Is it possible to count the time correctly? 
    I'm using a DAQ6009 to do my works, my VI is pretty big, and I need an iteration at each 1 ms (milisecond) as I'm using digital inputs to count 5 encoders events (I know that this is not the correct way to count encoders, but this is the only way I can do that, and it's working).
    Thank you all in advace! hope you can help me!
    hugs!
    Solved!
    Go to Solution.
    Attachments:
    teste.vi ‏6 KB

    OK.  Let me try to help you understand a few things.
    The Tick Count and Wait (and Wait Until Next ms Multiple) functions all use a 1 kHz clock that is derived from the processor clock. The accuracy of these clocks is not great, although probably comparable to your stopwatch accuracy.  Any timing generated by these functions will show some differences from the time of day clock as it is derived from a different oscillator.
    The front panel updates are timed both by LabVIEW and the OS. Most screens are updated 60-80 times per second, maximum. Depending on what else the OS is doing, a screen update could be delayed 10s of milliseconds or longer.  It is certain that not every value at the output of the Add function will be displayed.
    The Wait Until Next ms Multiple will wait more than 1 ms if the other code in the loop takes longer than 1 ms.  I am not sure, but I think the indicator is buffered so that any delays by the OS in updating the display should not slow the loop. I tried removing the indicator and it did not seem to make much difference.
    I modified your VI to provide several indications of performance. First, I added the three-frame sequence structure to allow timing of the loop. Second, I changed to a for loop which will run a preset number of iterations. Third, I connected the output of the Wait Until Next ms Multiple timer to an autoindexing tunnel so that a record of the time of each iteration appears in the Ticks array. I calculated the differences between successive times and displayed that on a graph so that you can see the performance.
    I did not mean to sound critical of your use of English.  You write in English much better than I could in your language!  The point I was trying to make is that general descriptions such as "is not counting correctly" without quantitative results or evidence to support the claim do not have enough information to help us help you.
    Lynn
    Attachments:
    teste.2.vi ‏13 KB

  • How to count time between two pulses

    Hello everyone,
    I want to count time between two boolean pulses?  Can anyone give me an advice? Thank you in advance!

    Hello Michael78,
    You've right. I have a DAQ board and i want to acquire torque and angle (from a torque transducer). I already done that, but sometimes it doesn't work properly. To acquire this, i count sign changing of the torque to acquire exactly one period (3 sign changing). Torque have a noise, and when passes through zero, count more than 3 sign changing at a time, and this stop my acquisition (figure 2). I want to set a time between 2 counting sign . I tried something with tick count...but i made something wrong . I hope you understand me....
    Attachments:
    Capture.PNG ‏51 KB
    Capture2.PNG ‏47 KB
    Capture3.PNG ‏123 KB

  • CM:  control counts in a BAI-formatted bank statement file

    Hi,
    Having a dispute with the bank. We're currently using the bank's propietary bank statement file. We're trying to move to one of the standard formats, in this case, the BAI (actually BAI2) format. So we're testing their BAI-formatted bank statement file.
    However, one of the control counts in a test file is off. Oracle CM is flagging this. The total credits control count in the file is not the same as counted during the processing of the file by Oracle CM. At issue are float adjustment transactions which are in the file but not counted in the file's total credits control count, re: BAI type code 100 in record type 03 contains the total credits control amount and the total credits control count.
    Float adjustment transactions are described as credit detail transactions (which have a BAI type code of 397). They are non-monetary transactions and thus their associated credit amount is 0. Are these transactions part of the total credits control count? Per BAI specs, I believe that they are counted.
    Thanks, Mike

    Some more information:
    - this is first bank statement for this account
    - i've tried setting up rules that map the external tcodes to various processing types with same result
    I think it's simply calculating the opening balance by subtracting the Total Credits from  the Total Debits.
    Opening Balance       532.573,91-
    Total Debit             3.721,99
    Total credits         536.295,90
    Closing Bal.                0,00
    Is this normal behavior?

  • [HELP] Agilent 53220A Counter Timer Will Not Initialise Using NI VI's!

    I am running National Instruments 2012 Development Suite.
    I have hooked up an Agilent 53220A to a PXI chassis via USB and MAX can see it.
    If I use the D:\Program Files (x86)\National Instruments\LabVIEW 2012\instr.lib\Agilent 532XX Series\Public\Initialize.vi library to initialise it, it takes ages before finally timing out.  I opened all the VI and issued the commands manually using the Measurement and Automation Explorer as follows:
    *IDN?\n = Returned the details of the Counter Timer.
    *RST\n = Returned no errors.
    *ESE 60;\n = Returned no errors.
    *SRE 48;\n = Returned no errors.
    *CLS;\n = Returned no errors.
    : SYST:ERR?\n = The subsequent read then times out!   (delete space between ":" and "S")...
    If I repeat the above but skip the "*SRE 48;" command it then works.
    Any ideas why my Agilent 53220A Counter Timer does not like the "*SRE 48;" command?
    Thanks.
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

    ChristopherPovey wrote:
    I am running National Instruments 2012 Development Suite.
    I have hooked up an Agilent 53220A to a PXI chassis via USB and MAX can see it.
    If I use the D:\Program Files (x86)\National Instruments\LabVIEW 2012\instr.lib\Agilent 532XX Series\Public\Initialize.vi library to initialise it, it takes ages before finally timing out.  I opened all the VI and issued the commands manually using the Measurement and Automation Explorer as follows:
    *IDN?\n = Returned the details of the Counter Timer.
    *RST\n = Returned no errors.
    *ESE 60;\n = Returned no errors.
    *SRE 48;\n = Returned no errors.
    *CLS;\n = Returned no errors.
    : SYST:ERR?\n = The subsequent read then times out!   (delete space between ":" and "S")...
    If I repeat the above but skip the "*SRE 48;" command it then works.
    Any ideas why my Agilent 53220A Counter Timer does not like the "*SRE 48;" command?
    Thanks.
    I have confirmed this morning that I have installed the drivers and library for LabVIEW 2012 version from the NI website.
    Any ideas anyone?
    Thanks.
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

  • Apple TV uploads can take up to 30 minutes. I need control over this, because it interrupts my presentations. How can I control the time it chooses to do uploads?

    Apple TV uploads can take up to 30 minutes. I need control over this, because it interrupts my presentations. How can I control the time it chooses to do uploads?

    this is exactly the kind of response i expected, almost begged support to please not do this to me and yet there it is another meaningless, non helpful, standard template response to restart my apple tv.
    this does NOT work which is why i am contacting you. i have tried all suggestions about unplugging and restarting and nothing works.
    i live in an apartment and logon to the provided wifi wireless. so i do not have access to a router. however, management says they have talked with their provider and have been assured that the required ports are available.
    remember all the jokes about how bad windows was because the solution was always to re boot. funny huh? how is apple any different.
    i have been to the local apple care store and they are clueless, too.
    should we just end it here and you admit that i will not be getting any support from apple on this one? i got the ipad because my kids were such big fans. it is difficult for me to share their enthusiasm.
    at this point i am just curious about how you say you cannot support your own product so i can complete my file on this contact.
    thanks...sorry it was you who got this problem..

Maybe you are looking for