Need some suggestion​s for creating a software based digital I/O counter

Hi All
I've been using LabVIEW to sucessfully create a number of fluid level monitoring applications for oil well drilling. bear in mind that I'm a geologist not a software engineer so you may have to talk/type slowly .
I've been using the USB 6009 & 6008 for these aplications so far, they are however limited by only having 1 counter per DAQ. What i'd like to do (if possible) is use the some of the digital I/O channels as counters. The events i'm attempting to count are simple open/closed pulse signals from a micro switch. The micro switch is attached to a slow running mud pump which is sending up to 3 pulses per second but is usually running at 10-80 pulses per min. The slow cycle rate of these big pumps means I can't use a frequency aplication as they don't seem to work below 1hz.
I've tried to use a case structure to create a counter but I'm afraid I can't seem to get the logic right to turn the output into a counted output. Anyone got a suggestion for things I could try?
Thanks
Kim

Kim,
Tttt yyyy pppp iii nnn gggg slowly.
You described your situation quite clearly.
As you probably know the digital inputs on the USB-6008/9 are software timed, so you have some uncertainty in the time of any sample.  Depending on your OS that uncertainty will typically be on the order of a few milliseconds but occasionally may be much longer.
To count the pulses in software requires a combination of several things.
1. You need to have a data acquisition method which is fast enough to capture each high and low state of the pulses produced by the pump.  For software timed Digital Input a good way to do this is to have an independent, parallel loop which reads the input line rapidly and passes the data or transitions to another loop via a queue.  This is known as the Producer loop in a Producer/Consumer architecture.  Examples come with labVIEW. A 10 ms Wait in the loop is probably appropriate.
2. You need to convert the digital inputs (levels) into pulses or transitions to be counted.  Suppose you want to increase the count by one every time the logical level changes from False to True. To do this you need to know the previous level and the current level. A shift register is one of the best ways to do this in LV.  Add a shift register to the loop.  Initialize it to False. Connect the result of the Digital Read to the right terminal of the shift regsiter inside the loop.  When that Read is True and the previous value (obtained from the left terminal of the shift register) is False, increment the count value (which is also kept in a shift register) in the case structure.
3. You did not indicate what you are doing with the counts or what the pulses represent.  Do you need to measure the frequency (or the period which is the reciprocal of the frequency)?  Do you need to accumulate the number of pulses? Over what time period?
Lynn

Similar Messages

  • Hello friends recently shifted from windows to mac need some suggestion on which software to go ahead with for editing, excel,power point presentation

    Hello friends recently shifted from windows to mac need some suggestion on which software to go ahead with for creating word editing, excel,power point presentation.

    Only Microsoft's Office for Mac 2011 14.4.8 will work on your Windows Office files in their native document format. Anything else, and particularly Apple's Pages, Numbers, and Keynote will perform translation on open, and export. This can, and will, introduce differences to your original documents, especially when sharing with others in the Windows Office 2010/2013 applications.
    Here is my short list.
    Office for Mac 2011 v14.4.8
    LibreOffice (latest)
    The current iterations of Apple's Pages, Numbers, and Keynote are not what I would term business/professional grade applications. Apple updates them infrequently, ignores user friendly features, omits others, and has introduced default backwards incompatibility between Yosemite and prior OS X releases of these applications. Read the reviews in the OS X App Store. Even for free with a recent Mac purchase, these products will transform your mood.
    The free LibreOffice is aggressively developed and designed as an MS Office replacement suite. There are occasions where it can open documents that Office for Mac, and Apple's products ignore. Extensive PDF manuals for the individual applications. Unlike Word, you can have two-up page viewing with a button click, or edit multi-page PDF. There is a forms designer. It can open nearly any document including MS Publisher and Visio documents from the Windows space. I use it.
    MS Office 2015 Preview for Yosemite is available, but as its title would suggest, it is not done yet, and some features are missing. I created a single-page Word document with a DRAFT watermark. Only LibreOffice v4.4.1 was able to open this document and preserve the watermark.

  • Need some suggestion on bapi

    Hello,
         I am not able to pass multiple values for single import parameter..i tired calling function module in loop and also tried RANGES..Need some suggestion on this..
    Thanks and Regards,
           sapdev86
    Moderator Message: Basic Question
    Edited by: kishan P on Oct 14, 2010 11:46 AM

    Hi,
    BAPI is nothing but a function module and also RFC enabled. So u can call that fm from outside SAP. U can call that BAPI using some logic or u can make hardcoding the parameters, its depends mainly on ur requirement.
    Regards
    Amitava

  • Suggest BAPI for create notification IW34

    Hi,
    Kindly suggest BAPI for create notification IW34.
    Regards,
    Tanaya

    How to find function module or Bapi for particular transaction in sap?
    If you mean that you need to know what BAPI's a particular tranx uses, which I can only assume that's what you mean, then you should access the code behind the transaction and search for 'CALL'. That normally is the standard method that think that most people use. 
    Suppose you want to find the bapi for creating a sales order, you usually use transaction VA01 for this. 
    1. Find out the package of the transaction. 
    Start Va01 go to system --> status. 
    Double click on transaction 
    Package is VA 
    Open this package in SE80 
    Open business engineering-->Business object types 
    Find the BO which sounds the most appropriate 
    I would suggest BUS2032 Sales Order 
    Double click. 
    Open methods. 
    Find the released method with from data or something similar in the name 
    , Createfromdat2 
    Position the cursor in it and click the program button 
    Scroll down to find the bapi used in this method 
    With this way you can also find out programs and FM's 
    2. Start va01 go to system-->status 
    Double click transaction VA01 
    Double click on package 
    Read the application component. (this is SD-SLS Sales) 
    Then open the transaction BAPI 
    Sales and distribution>Sales>sales order 
    createfromdat2 
    Answer: This is  the BAPI for your mentioned   transaction code BAPI_GOODSMVT_CREATE.
    thanks,
    Sankar M

  • Need some sample documents for DME development

    Hi,
    I need some sample documents for DME development. I expect any information covering developing DME formats and steps for downloading a DME file (this I need for checking my formats).
    please, send any relevant info you have to mail id mindaugas.kazlauskas at gmail.com
    Many thanks and reward points ahead!
    Regards,
    Mindaugas

    Hi,
    the main thing is that I need format with payment information structured in single column, like this:
    //separator//
    value1
    value2
    value3
    //separator//
    value1
    value2
    value3
    //separator//
    maybe there is any SAP format structured like this?
    Regards,
    Mindaugas

  • Why do u need a custom structure for creating a custom bapi

    Hi ,
    why do u need a custom structure for creating a custom bapi.

    Hi,
        Once any Bapi realeased the structures it is using freezed to this bapi, the structure becomes specific to this Bapi, we can not make any changes over there. That is why we need custom structure for creating a custom bapi.

  • Need some suggestion for Demantra Shape modeling

    Hi All
    Can any one sugesst me how to create a Demantra Shape modeling using 7.2 version. I am working on a POC which includes shape modeling.
    Thanks
    Ram

    Kim,
    Tttt yyyy pppp iii nnn gggg slowly.
    You described your situation quite clearly.
    As you probably know the digital inputs on the USB-6008/9 are software timed, so you have some uncertainty in the time of any sample.  Depending on your OS that uncertainty will typically be on the order of a few milliseconds but occasionally may be much longer.
    To count the pulses in software requires a combination of several things.
    1. You need to have a data acquisition method which is fast enough to capture each high and low state of the pulses produced by the pump.  For software timed Digital Input a good way to do this is to have an independent, parallel loop which reads the input line rapidly and passes the data or transitions to another loop via a queue.  This is known as the Producer loop in a Producer/Consumer architecture.  Examples come with labVIEW. A 10 ms Wait in the loop is probably appropriate.
    2. You need to convert the digital inputs (levels) into pulses or transitions to be counted.  Suppose you want to increase the count by one every time the logical level changes from False to True. To do this you need to know the previous level and the current level. A shift register is one of the best ways to do this in LV.  Add a shift register to the loop.  Initialize it to False. Connect the result of the Digital Read to the right terminal of the shift regsiter inside the loop.  When that Read is True and the previous value (obtained from the left terminal of the shift register) is False, increment the count value (which is also kept in a shift register) in the case structure.
    3. You did not indicate what you are doing with the counts or what the pulses represent.  Do you need to measure the frequency (or the period which is the reciprocal of the frequency)?  Do you need to accumulate the number of pulses? Over what time period?
    Lynn

  • I need some suggestions on what type of dock to buy for my iPod Touch 4 that would be combatable with it.

    I use to have a JBL dock for my iPod Touch 4 but it no longer works with it.  I seem to be having some problems finding a dock that would work with a iPod Touch 4.   All I want is a good dock with stereo sound and that is chargable and would also have an adaptor so I won't have to use batteries but one with batteries will do if that's all I can find.  I don't need one that has a radio and a clock with it.  One that probably doesn't go over 100.00.  Would like some suggestions from anyone please?   Thanks.

    Thanks for the replies. I have finally found a definitive answer on the Microsoft website (after a few days of virtual digging).
    http://download.microsoft.com/download/6/B/A/6BA3215A-C8B5-4AD1-AA8E-6C93606A4CFB/Windows_Server_2012_R2_Remote_Desktop_Services_Licensing_Datasheet.pdf
    And I quote for the benefit of everyone else looking for the same answers:
    "While RDS is shipped with Windows Server software, it is licensed separately through a Client Access License (CAL) model. This means that each accessing end point (i.e., a User or a Device) must be covered by an RDS license to access Microsoft VDI infrastructure.
    And this CAL is an additive CAL, which means that in addition to a Windows Server CAL, customers must acquire a Windows Server RDS CAL for each user or device that:
    - Directly or indirectly accesses any of the RDS product functionality, and/or
    - Directly or indirectly interacts with the graphical user interface of the server software using RDS functionality or other third-party technology
    For example, to access RDS functionality in Windows Server 2012 R2, Windows Server 2012 CALs and Windows Server 2012 RDS CALs are required along with the server software licenses."

  • Suggested method for creating flash video?

    I've searched through the forums and see that Apple seems to want to make things difficult for creating flash video for some reason. Regardless of why, does anyone have a suggestion for a simple solution to take a QuickTime movie file and convert/export it to flash video? I don't need a lot of bells and whistles, just the ability to end up with a flash file of my video. Thanks.

    Thanks, but I'm really trying to find something for use on my Mac. Or perhaps I'm trying to do something that isn't even necessary... What's the recommended method for creating good-quality video from my Mac to be used on the web? Flash stuff seems to have a great quality for smaller file sizes. Is there a comparable format I could use on my Mac to get similar results which most web users could open without installing some additional software to read it?

  • Need some design idea for a multi- thread  concurrent system

    I am totally new to this area. Hope ppl can give me some suggestion for the following project.
    The project is using socket to deal with huge concurrent data. Server will send me more than 50K (maybe more) XML strings in a short time.
    I need parse strings and save them in the data structure.
    What I have done is using ExecutorService to deal with this problem. Unfortunately, it's already too slow even I don't save data into data structure.(data structure will cause synchronization problem, and make system even worse).
    I was required to develop this software in a single machine and windows based OS.
    Should I only use single thread to do this project? or some other strategy?
    Can anybody give me some suggestion.
    Thanks so much.

    Peter. Thanks again.
    Could you help me to take a look at this code. Appreciate that.
    ThreadPool class:
    protected ExecutorService threadPool = Executors.newFixedThreadPool(5);
       incoming = new Socket("127.0.0.1", port1);
       outcoming = new Socket("127.0.0.1", port2);
       out = new PrintWriter(outcoming.getOutputStream(), true);
       isr = new InputStreamReader(incoming.getInputStream());
       is = new BufferedReader(isr);
    while (true) {
         String str;
         str = is.readLine();
         if (str == null) {
                 cleanup();
                 closeSocket();
                 printout();
            } else {        
                             this.threadPool.submit(new WorkerRunnable(str,          
                                                             "Thread Pooled Server"));
           }WorkerRunnable class:
    public void run() {
    try {
                SAXBuilder builder = new SAXBuilder();
                InputSource is = new InputSource( );
                is.setCharacterStream(new StringReader(xmlString));
                org.jdom.Document doc = builder.build(is);
                org.jdom.Element root = doc.getRootElement();
                org.jdom.Element order = root.getChild("Changes");
                List orderList = order.getChildren("OrderChange");
                if (orderList.size() != 0) {
                               org.jdom.Element orderchange = (org.jdom.Element) orderList.get(0);
                               String price = orderchange.getAttribute("orderPrice").getValue();
                               String quantity = bookchange.getAttribute("orderQuantity").getValue();
                               String symbol = bookchange.getAttribute("orderName").getValue();
                                } catch(Exception e)
                              {}

  • Need some suggestions in writing package..

    Hi everyone,
    I am just asking this question to know a better way than what i am doing.
    I have a patient with 2 million rows in it.Is it possible to extract 2 million rows in a text file using UTL_FILE?.I need to extract each patient related data which comes from differnt tables (bigger than patient table) in a comma deleted file.For each patient id i have to query other tables and get the data related to that patient(according to the requirement).For that i need to call different functions against different tables.
    Some think like this..
    Create or replace procedure XXXX
    cursor -----> to get the patient id's
    variables ------> declare any other variables
    begin
    file handler for utl file to write into a file
    open cursor
    using bulk collect to fetch limited no of rows
    For each patient id loop
    data1 := function1
    data2 := function2
    data3 := function3
    string : = data1|| data2 || data3|| ....
    UTL_FILE.put_line
    reset the string
    end loop;
    end;
    My questions are:
    Is it OK to call differnt functions for each patient id (2 million patients) are there? is there any better way to do this.
    Please give me some suggestions if i need to change any steps that i am following to get better performance.
    Thanks
    Phani

    Hello,
    It would be strongly advisable to minimise your function calls here.
    What I would suggest is: writing one piece of SQL to be looped through with BULK COLLECT, so these:
    data1 := function1
    data2 := function2
    data3 := function3Will be taken care of in the main SQL. Otherwise things will be very, very slow.
    Therefore, something like this:
    BEGIN
    DECLARE CURSOR c_all_data IS
                        SELECT -- put all your data to be retrieved in this SELECT, that will easily be the quickest and most efficient
                                     FROM tab1
                                     JOIN tab2 ON (...
    v1,v2,...
    BEGIN
       OPEN c_all_data;
       LOOP
           FETCH c_all_data BULK COLLECT INTO v1, v2, ....... LIMIT 1000;
           FOR i IN 1 .. v1.COUNT
           LOOP
                --write to your file
                UTL_FILE...
           END LOOP;
           EXIT WHEN c_all_data%NOTFOUND;
       END LOOP;
       CLOSE c_all_data;
    END;

  • Conditiuons needs to be ZERO for creating third party sales order.

    Hi Friends,
    we are creating third party sales order, which triggers PO automatically based on the outline agreement.
    before saving the PO , i needs to set ZERO for cretain condiations.
    please let me know how to solve this.  means any user-exits are to solve this or anmy BADIS.
    REGARDS,
    vIJAY

    Hi Satya,
    i am creating Project for  EXIT_SAPMM06E_006... but it asking  Enhancement Name. and also creation steps and implement steps.
    which Enhancement that i want to implement.
    pls help.
    regards,
    Vijay

  • Help for creating chatting software

    hello friends,
    i tried of preparing chatting software, i built serversocket , client software, it works fine on the same machine, but when i run client socket on different maching, it gives exception, my teacher says, i have to use RMI for that, what things i need to know for preparing chatting software??

    What gives an exception, what kind of exception, and under what circumstances? Could you tell us a little more about your design?

  • Need some reference book for BIW

    Hi,
    I need some books for BW,i am new to bw ,presently working in sap abap.
    Is there any free books available in net means ,please send to me.
    I thought HENDRY FU book is best ,is it available in net.
    can i download that book.
    Regards,
    Kalidas.T

    Hi Kalidas,
    BI platform:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/594e3c6bf4233fe10000000a114084/frameset.htm
    performance optimization
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62dee07211d2acb80000e829fbfe/frameset.htm
    analysis & repair environment
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/1d733b73a8f706e10000000a11402f/frameset.htm
    scheduler
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e1/b7463c32a3fe13e10000000a114084/frameset.htm
    FI extraction
    http://help.sap.com/saphelp_bw32/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm
    whats new in BI 7.0
    http://help.sap.com/saphelp_nw04s/helpdata/en/57/a21f407b402402e10000000a1550b0/frameset.htm
    System administration tasks
    http://help.sap.com/saphelp_bw30b/helpdata/en/d1/e81c3b85e6e939e10000000a11402f/frameset.htm
    process chains
    http://help.sap.com/saphelp_nw70/helpdata/en/8f/c08b3baaa59649e10000000a11402f/frameset.htm
    WAD screen cam
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6dd54713-0c01-0010-8691-a3576b9a95d9
    BI content installation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c1/ea683cc5e8ca68e10000000a114084/frameset.htm
    BI suite :Business Explorer
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5b/30d43b0527a17be10000000a114084/frameset.htm
    BI 7.0 & EP 7.0 integration
    /message/3945089#3945089 [original link is broken]
    DTP's
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/fb8ed8481e1a61e10000000a422035/frameset.htm
    Extractions in BI
    https://www.sdn.sap.com/irj/sdn/wiki
    transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    Hendry fu is available in net...before that u follow the above links..then go for FU book.. and welcome to BW
    Regards
    ashwin

  • I need some XP drivers for Satellite L350D-110 PSLE8E

    Hello there.
    I have now my brandnew Toshiba notebook. It comes only with VISTA, a very nice looking system.
    But I want to use my notebook in our office too and then I need to install XP Professional.
    XP is already installed, but i need some drivers to complete the system installation.
    Here is screenshot from my hardware manager (hope it will work in this forum):
    http://img443.imageshack.us/my.php?image=screengmhv9.jpg
    Can anybody help me?
    Or is there a chance to get a downgrade option from Toshiba?? Without a downgrade I cannot use my brandnew notebook.....

    For the Satellite L350D and Windows XP there are all drivers available.
    I think you forget to install two or more drivers.
    Here you can download it:
    http://eu.computers.toshiba-europe.com => Support & Downloads => Download Drivers
    Search for your model and you will get a list of all drivers. Then you can compare which drivers you didnt install yet.
    As Jeffrey said, I should be the AMD Processor Driver, Realtek driver and the card reader.

Maybe you are looking for

  • Robohelp 8: MSWord 2007 rather then MSWord 2003

    Hi team, I want replace the use of my microsoft word 2003 with robohelp project I usually open by using microsoft word 2007. This operation who seems to be easy at the begining, are now a very busy task and give me a lot of problem.... and message...

  • Oracle 10g R2 for Windows ignores init.ora and registry values

    Hello, I have a strange issue. I try to set some parameters for Oracle but it doesn't seem to work. Here the story: I created the DB with the DBCA under windows and set my init parameter at frist creation with 3 important values: OS_AUTHENT_PREFIX =

  • Mac won't recognize or mount ipod

    i have re-installed itunes and ipod updater, as well as attempted to restore my ipod, which only resulted in no music on it and a window stating "The iPod could not be unmounted because it is in use. Please close any open files on the iPod and try ag

  • How to make webpages fresh?

    my webpage is dynamiclly(jsp page), but computer will save the file to temp folder, and when the user access the page, it will not show fresh data to user, except the user click "refresh" button. how do I make it real dynamic? whenever user access th

  • HTTP MBR with OSMF

    I just can't get it to work... tried both via F4m and smil, versions 1 or 2 of HDS... nothing works. Any suggestions? Here's my code: package           import flash.display.Sprite;           import flash.events.EventDispatcher;           import com.a