How do I read a pulsed input on an SCB-68 counter channel?

Hello all, I have been searching through the DAQ help and this board
for a few hours now and I cannot find an answer that addresses what
should be a simple problem. Let's start with hardware and software: I
have a 6062E PCMCIA DAQmx card connected to a SCB-68 (E Series)
connector block. I am running Version 7.1.0.306 of Measurement Studio
for Visual Studio .NET and am coding in C#. So please, no LabView
answers.
I am trying to read the pulsed output of the Omega HHT-1501 Digital
Tachometer - it outputs a TTL LOW pulse every time the sensor is
triggered, I would like to read in these pulses and  get the
frequency to determine RPMs.  As far as I can tell I need to
connect the pulsed signal line to CTR0, which is PFI9/GPCTR0_GATE on
the connector block, pin #3. I have verified that the tachometer is
indeed pulsing correctly. I have used the DAQ Assistant to create a
DAQmx task to acquire the frequency of a digital signal using the 1
Counter Low Frequency Measurement method, input range is set from 1Hz
to 1KHz, starting edge is set to falling. For Task Timing the
Acquisition Mode is Continuous, Samples to Read = 100.
When I run the test I get no response. And it also seems that the
GPCTR0_GATE is always at +5V. I have tried just about every other
combination of inputs, including using CTR1 on GPCTR1_GATE, pin 41, all
with the same result - no signal read.
So what is the problem? Every post or help article I have read makes it
sound like plug and play to read the pulses but this is not the case -
does the counter gate need to be configured as an input in either
software or hardware? Am I supposed to have a signal set on the SOURCE,
and if so what? And what about my ground line from the pulse source? I
have tried attachign that to DGND, still no result, and if I attach the
pulse signal gnd to the GPCTR0_SOURCE it causes my tachometer to lock
up.
This thread
http://forums.ni.com/ni/board/message?board.id=170&message.id=34826&query.id=3937#M34826
seems to be very closely related to what I want to do but is as vague
as the help articles - it mentions using one of the two timebases as
the source input - what does this mean in terms of code/wiring?
Additionally in the NI-DAQmx help article under Device
Considerations->Counter Signal Connections->AO/E/S Series it says
"The count direction terminal must be tristated to use an external
signal. Reset the device to ensure the terminal is tristated" for edge
counting. A) Is this related? and B) how does one tristate by reset?
Power cycling the scb-68 has no apparent effect on anything.
I would appreciate any help on this matter, hopefully with as much
detail as possible since the help manuals seem to be mostly useless for
guiding one in performing any task.
Thanks!
                   J. Slater

Hi Shyam,
The major factor that would come into play with the signal having some noise is that the counter is expecting a TTL signal and the oscilloscope is measuring an analog input signal. If your signal floats above the TTL thresholds or does not rise/fall within the specifications, the behavior is not predictable and it can be measured as a high or low by the counter. An oscilloscope will measure the analog signal and you may be able to measure the frequency of the noise on your scope by analyzing a smaller timeframe of the signal.
What Is the Definition of a TTL (Transistor-Transistor Logic) Compatible Signal?
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/acb4bd7550c4374c86256bfb0067a4bd
Steve B

Similar Messages

  • How can I read Extended APDU input to the same buffer

    The following is the code I am currently using where inBuffer is an intermediate array of 1000 length. However, I do not want to allocate any buffers at all, and just want to send a command apdu of 1000 byte length and modify it in the code and return the modified buf in the response APDU.
    // Read extended APDU input
    byte[] buf = apdu.getBuffer();
    short bytesRead = apdu.setIncomingAndReceive();
    short dataOffset = apdu.getOffsetCdata();
    // store first chunk in our intermediate byte array <-- how do i get rid of the intermediate array
    Util.arrayCopyNonAtomic(buf, dataOffset, inBuffer, (short) 0, bytesRead);
    // what is the overall length?
    short overallLength = apdu.getIncomingLength();
    short messageOffset = bytesRead;
    if (bytesRead != overallLength){ // otherwise we're finished, all bytes received
         short received = 0;
         do{
                   received = apdu.receiveBytes((short)0);
                   Util.arrayCopyNonAtomic(buf, (short)0, inBuffer, messageOffset, received);
                   messageOffset  += received;
              } while(received != 0);
    * REST OF CODE IN PROCESS METHOD
    I have also tried replacing the above code with the following
    short bytesLeft = (short) (buffer[ISO7816.OFFSET_LC] & 0x00FF);
    if (bytesLeft < (short)55) ISOException.throwIt( ISO7816.SW_WRONG_LENGTH );
    short readCount = apdu.setIncomingAndReceive();
    while ( bytesLeft > 0){
      // process bytes in buffer[5] to buffer[readCount+4];
      bytesLeft -= readCount;
      readCount = apdu.receiveBytes ( ISO7816.OFFSET_CDATA );
    as shown in the javadocs API, but it does not compile.
    This is my command APDU:
    /send 800100000003E8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003E8
    As you can see:
    CLA - 80
    INS - 01
    P1 & P2 - 00
    LC - 0003E8
    Data - 1000 0s
    LE - 03E8
    I am using JavaCard 3.0 with JCOP in Eclipse. How can I read the extended length apdu to the same buffer? I have no problem in returning an extended length response APDU. Thanks a lot for the help.

    You should not call the convenience method setIncomingAndReceive() in your first code. Please find out about the different APDU states. Furthermore, your Applet should implement the ExtendedLength tagging interface.

  • How do I associate a clock (source) with a (or multiple) counter channels

    We are newbies using a 6602 with the SCB-68 interface.
    We are reading 8 different TTL pulse trains. We've determined that we need buffered periodic event counting (BPEC) and that we need a common clock (source).
    We've used the measurement and automation software to confirm that we can see our signal coming into the card. However, we cannot seem to perform functions requiring a clock (e.g. BPEC).
    Question: How do we associate an 80 MHz clock to the source for our counter channels? The the card has clocks, yet our error messages indicate that an external clock had to be used for our task. We may be stuck in the meaning of "external".  Though a clock is in the card, is it considered external to my counter channel? Do I connect it via jumpers in the SCB-68 or are there ways to associate it via commands?

    Hi NHJared,
    There a few examples in the LabVIEW Example finder that will
    help you make these measurements.  (Help
    >> Find Examples >> Hardware Input and Output >> DAQmx
    >> Counter Measurements >> Period or Pulse Width)
    The DAQmx Timing VI should be set to implicit.  This setting will automatically route the appropriate
    clock necessary for your measurements. 
    An external clock is a signal that is created by another device other
    than the PCI-6602 and connected through an external pin on the PCI-6602 (e.g. PFI
    pin) 
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • How do i read in keyboard input

    This must be one of the most simple things to do but i cant find an example or any info any where i thought i could use readLine but this seems to be for reading in a file line. I just want to read in whatever a user enters at a prompt
    Thanks

    import java.io.*;
    class Queue{
         public static void main (String args[])
         throws Exception {
              System.out.println("Enter a number ");
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              int i = Integer.parseInt(br.readLine().trim());
                                    System.out.println("You have entered "+i);

  • How to read 2 analog inputs with VISA

    Hello everyone! I want to read two analog inputs using VISA serial communication from the arduino.  I'm currently able to read one of the input but how do I read two analog inputs on labview?

    Hi lamela,
    again I have to ask: HOW does the string look like? Is it so hard to provide an exact example of your received string???
    I think the string is showing one value from the two inputs
    Are you sure or are you guessing? How can we tell what you might "think" when you aren't able to provide examples?
    You wrote you send values from the Arduino using the command "println(value1, value2)", but now you "think" you only receive ""value1" in LabVIEW?
    Get your data communications clear! (And learn to provide meaningful examples!)
    Edit after your edit:
    my code to serial print two inputs: Serial.println(Voltage, Current);
    Even if I print separately: Serial.println(Voltage);
                                                 Serial.println(Current);
    The first command is completely different then the second part! In the first you should receive two values in one line, in the 2nd one you receive one value per line: You need to adapt your string parsing to these strings!
    Again: send both values in one line. Use the LF as termchar. Separate the values by some separator char like comma. Check the received string for validity. Use some error checking in your VI.

  • How to Read from Standard Input?

    Hi,
    I am new to Java. Been reading the tutorial, but still unable to find How to read from standard Input.
    Can anyone help? Thanks.
    Here is my simple & error code:
    public class test
    public static void main(String[] args)
    char filename[];
    int i=0;
    System.out.print("Type in a filename to read: ");
    while ( System.in(filename) != -1 )
    i++;
    System.out.print(filename);
    RP

    import java.io.*;
    public class forum{
         public static void main(String args[]) throws IOException
    InputStreamReader is = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(is);
    String input = "";
    do
    try
    System.out.println("Enter command: ");
    input = br.readLine();
    catch ( IOException io ) {}
    } while (!input.equals("exit"));
    [code\]
    package to import is java.io.*;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I generate a pulse with a user specified puse duration, down time and repitition, and then out put to a graph?

    How do I generate a pulse with a user specified puse duration, down time and repitition, and then out put to a graph and then to daq ports? 
    I used lab view in engineering class, but that was the extent of my usage and after fiddling around in lab view and looking on the web looking for solution, I could not produce desired results.  My professor wants me to produce something that will output a pulse for a specified duration, then downtime for another specified duration and then repeat the process a specified amount of times.  
    I am using labview version 7.1
    Thanks in advance.

    Hello,
    Are you using hardware (DAQ card) to generate this pulse or are you planning on doing this all in software.  If you have a DAQ card in LabVIEW you can go to Help » Find Examples and then select Hardware Input and Output » DAQmx » Generating Digital Pulses » Gen Dig Pulse Train-Finite.vi.  This will use a counter from your DAQ card to generate a finite number of pulses at a specified frequency and duty cycle.  Give this a try, or let me know if you are not using hardware, and we can figure something else out.
    Regards,

  • How can I read a column of numbers saved as .txt and display as a wave?

    Hi Tiano
    LabVIEW General
    Ask:
    Please enter a one-line summary of your question
    Resources
    • Technical Support
    • Development Library
    • Measurement Encyclopedia
    "data/time reading into chart"
    "In the attached file, I am trying to read the first column of data, and the next column is the value on the x-axis I want it plotted at. How do I read two columns of different data? I have looked in the books I have access to and the help within Labview but am still having trouble.
    Thank you,
    Ellie"
    data_set (Plain Text, 3K)
    -posted by Ellie on 9/11/2001
    markwysong on 9/11/2001 answered:
    "Ellie,
    The first thing you need to do is to read your file in as a spreadsheet file. Then, you display it in a chart.
    That sounds simple, but looking at your dataset, there's a few things you should know. First, the "read from spreadsheet VI" is looking for data in columns, like your data set, but columns separated by tabs. Therefore, your data must be saved that way; currently, it doesn't seem that it is. Another thing; you must skip the header portion (labels) of your file when reading.
    Next, it would be easier if your time was first, and your data was second in your columns, but that can be overcome. In the VI I am including, I have copied your data set into a file called data.txt, and I've removed the header and separated the columns with a tab. Then, I read in the data, and I break out each column so I can put the time first, and then I combine them again into a cluster so it can be displayed on an XY chart.
    Take a look!
    Mark"
    Graph data from file (Binary Executable, 20K)
    data.txt (Plain Text, 3K)
    This answer has not yet been rated.
    Rate this answer:
    Mikael Garcia on 9/11/2001 answered:
    "Ellie,
    Here is one way of doing it. Take a look at this example (compatible with LabVIEW 4.1 and up) and post comments if you need further help. Basically, I read your file as text; split it; and make use of the Spread sheet string to Array function before I plot your data. Hope this helps./ Mikael"
    ExtractAndPlot.vi (Binary Executable, 36K)
    This answer has not yet been rated.
    Rate this answer:
    Ellie on 9/12/2001 commented:
    "Thank you. I am trying to get the data from the text file into a string and am having some trouble. I am reading the file from a spreadsheet, and sending the output array to "Array to Spreadsheet String", but I'm not sure this is what I want to do. Is there another way to make an array into a string? Do I need to reformat my data?
    Can you offer me any advice?
    Thank you."
    data_1 (Plain Text, 3K)
    Mikael Garcia on 9/12/2001 commented:
    "I noticed that you changed your file format according to what was said here. Yes, this new file of yours is easier to use but your original file does not have to be changed. Take a look at this example. I now added the file-read part. It will give you a dialog to locate your data file (use this VI with your original file with the header since this VI includes a string split function). Hope this helps. /Mikael"
    ReadExtractandPlot.vi (Binary Executable, 35K)
    Niko on 9/12/2001 answered:
    "If you read this file with the "read from spreadsheet file.vi" you get you
    data in a 2-D-array. Now it is easy with array- and cluster-functions to
    handle the data the way you want.
    hope that helps, Niko"
    This answer has not yet been rated.
    Rate this answer:
    I intend to read from a .txt file that contains a column of numbers. After reading I want to display it as a waveform. In fact the numbers represent points along a waveform/graph of Flow vs. time. Thus I want to have this info in the chart or graph with flow in the y0axis and time in the x-axis. Can someone give me some detailed help please? Thank you in advance.
    Attachments:
    The_file.txt ‏18 KB

    All you have to do is use Read From Spreadsheet File.vi that's on the File I/O palette. For your example .txt, set the Transpose input to true and wire the First Row output to a waveform graph. The only problem I see is that since your file doesn't contain any sampling info, the time axis will be relative. If have that information elsewhere, then you can put a build waveform function between the read and the graph. Wire the First Row output to the Y input Build Waveform and add t0 and dt values. I've attached an example.
    Attachments:
    Graph_from_text.vi ‏29 KB

  • How can I create a Text-Input Field in BexAnalyzer for a Planning Function

    Hello,
    i want to create a pre calculation(contribution accounting) for Materials in BI-Integrated Planning. These Materials aren't in the master data. So I create a new Info Object for pre calculated materials with only a material-number as key and a text-description.
    Now I want to write a Exit-Function, which creates new materials in these Info Object. The user should start this function in a planning application in BexAnalyzer. There the user should have the possibility to enter a text-description for the new material. How can I create such a Text-Field in BexAnalyzer and how can I read this text filed in a planning function (exit).
    Thanks in advance

    Hi Jürgen,
    you can create a parameter for this in the exit function and a variable for the parameter. In BEx Analyzer then create a button for the planning function; in the button parameterization use VAR_NAME = , i.e. use an Excel formula here to get the value from an Excel input field.
    The command range should be some 'hidden area' in your Excel sheet.
    But may be you don't need this. Use a characteristic without master data. Then ensure that that the query uses the option 'key' as display. In new lines you can then enter the key, the system creates a SID on the fly (but the text table will not be updated). In this scenario you may take text also from the key. May be you can update the text table (online or in batch) by simply using function modules from function group RSNDI_MD (not released by SAP).
    But observere that the system in BI Planning reads only the active version, i.e. if you change something on the fly the changes may not be visible.
    Regards,
    Gregor

  • How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?

    hi frnds.
    My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
      ITS URGENT.POINTS WILL BE REWADED.THANKS  IN ADVANCE.

    Hi,
    Go through this thread.
    [expand and collapse|expand and collapse]
    Cheers,
    Simha.

  • How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    What do you want to populate the form with?

  • How do you check if the input is empty?

    Hello,
    I am asked to write a program which gets as input in the command line a number of strings, and is to print out the first of these string.
    but if the input is empty it must print our an error message.
    how do i check if the input is empty?
    i guessed
    public static void main (String[] args){
         if (args == null)
         ........but thats wrong.
    Thanks,
    iris

    If no arguments were passed, it means that there are zero arguments entered. So the args array will have a length of zero.

  • How to use RFBIBL00 as direct input in LSMW

    Can any one Please help how to use RFBIBL00 as direct input in LSMW ? How should be structure Same level or subordinate level as I will be having single text file ?
    I have around 15 fields with me
    BKPF
    STYPE     C     1
    BLDAT     C     10
    BLART     C     2
    BUKRS     C     4
    BUDAT     C     10
    XBLNR     C     10
    WAERS     C     3
    XPRFG     C     1
    XMWST     C     1
    BSEG
    STYPE     C     1
    NEWBS     C     2
    DMBTR     C     10
    KOSTL     C     10
    SGTXT     C     10
    PRCTR     C     10
    NEWKO     C     10
    MWSKZ     C     2
    Thanks and Regards
    Guru

    Hi,
    look testabap RFBIBLT0, which creates testfile
    A.

  • Measurement error in reading Encoder Pulses

    I am using PCI-6601 card to read a Linear Encoder which gives 2000 pulses per mm of distance.The accuracy of the Linear encoder is 2Microns.In my application I am measuring a distance of 7mm.But the card is reading with an error of 30 to 50 Microns error.We had checked up all the factors related to mechanical and Encoder.In fact the same application was earlier working with Advantech Encoder card which has provisons to connect the A,B,A Bar,B Bar inputs from Encoder.There was an accuracy of 0 to 5Microns.But the application was replaced with NI Card because of the continuous problem of the Digital I/O Card used from Advantech.
    Mail me the possible causes and also the troubleshooting procedures for correcting the above problem

    Hi,
    What I think is happening is there might be some noise on your signal lines. The PCI-6601 counters are capable of detecting a pulse as small as 20ns. If the Advantech card can't detect pulses at that small a resolution, it might be ignoring "noisy" pulses that shouldn't be there. Are you reading more pulses than you should be or less?
    There are a couple things I might be able to suggest to clean up your signal. The counters support several different encoder modes. Try using X4 Encoders. An X4 encoder counter increments or decrements on each edge of channels A and B. Whether the counter increments or decrements depends on which channel leads the other. Each cycle results in four increments or decrements. I believe this X4 mode is more noise resi
    stant than the standard mode.
    Another thing you might want to consider is applying a filter to the input signals (debounce or deglitch filters). Each PFI line coming from the I/O connector can be passed through a simple digital filter. The filter operates off a filter clock and a fast internal sampling clock. It samples the signal on the PFI line on each rising edge of the sampling clock. A change in the signal is propagated only if it maintains its new state for at least the duration between two consecutive rising edges of the filter clock (one filter clock period). The frequency of the filter clock determines whether a transition in the signal may propagate or not.
    6601/6602 User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/DD0DBB6404BC139886256721007CF16D?OpenDocument&vid=niwc&node=132100_US
    Hopefully one of these suggestions will do the trick. Have a good day.
    Ron

  • Help: How can I read an integer from keyboard

    Hi,
    I am new to java, and I know how to declare integer variable,
    but how can read an integer input from keyboard and assign it
    to the variable.
    Can anyone help me on this.
    Thanks
    Studentfj

    the easiest way is to
    import javax.swing.*
    and use the methods and functions in there
    otherwise from command line i think as far as i remember it is System.in

Maybe you are looking for

  • Can I Re-Associate my iPad with my Apple ID?

    Long story short I had a problem with my Apple ID when re-downloading my music so I contacted iTunes support and they removed my iPad from my Associated devices in my Apple ID, can I Re-Associate my iPad with my Apple ID? I can still download all my

  • Hard drive "unallocated" - trying to get it back

    Please advise if  "hardware" is not the right category for this issue. I have a Pavilion dv2660se running Vista 32bit Home Premium.  It all started with a system freeze over a week ago.  When attempting to reboot, the system would not come up - all a

  • In Mountain Lion, Safari 6 address bar is blank

    No matter what website im on, the web address bar is blank. Unless I click on it, I cant see the web address. Please help.

  • JCA in web service

    Hi, I am writing my first web service and I need to connect to R/3 system. I would like to use JCA(or what is better JCA or JCO?) but i dont know where i may take request/user object which are used in this sniplet. ConnectionProperties prop = new Con

  • How to consume OData service in  sapui5

    hi,     how to consume Odata service  in sapui5 (table).   If any idea  please share with me.