VBAI: Fire a pulse every N msec based on inspection status

The VBAI Delay function seems to have the functionality I am looking for, but it is too coarse in that the time lapse is 1 second minimum.
I have a Smart Camera (1772). I am doing an OCR inspection that could take a somewhat varying amount of time. I would like to fire a rejector if the inspection fails. The rejector must fire at a fixed amount of time after the camera is triggered. If I cannot reliably do that, then I need another controller in the system which I should not need because the Smart Camera shoulkd be more than adequate. I know it can be done in RT, but I would like to keep things in VBAI for ease of Customer training.
Sequence of operations:
1. Parts travel under 1772 on a conveyor
2. Sensor triggers 1772 when a part is present
3. Image is acquired and processed. OCR inspection performed
4. If OCR inspection fails, fire output pulse exactly 100 (for example) milliseconds after the trigger from step 2
5. Repeat from step 2 
Any idea how to achieve that in VBAI?
Thanks,
Dan
Solved!
Go to Solution.

You could have a Generate Pulse step before your acquisition where the pulse is configured to generate a pulse based on a trigger (so configure a continuous pulse and wire you acquisition trigger to an ISO Input line as well that will trigger the output). Now this is the important part...you need to make sure your processing is done before the 100ms or whatever delay you specify or the pulse will begin. If you determine that you don't need to pulse based on your processing, transition to a state where you stop pulse generation on that line to stop it before it happens. In either case, transition to the End state and then the inspection can start again with the state that has the Generate Pulse/Acquire/Process and so the pulse will be reconfigured again for the next part.
If this doesn't work for you, then you could try a SW timed approach. You could have a Run LabVIEW step that gets an accurate timer value when the acquisition step completes, and another VI call that will wait for a user specified amount of time (millisecond resolution) before it continues.
I would recommend the first option since it will be hardware timed (but requires some extra wiring), and if that doesn't work, I can help you with a VI that will do the SW timed behavior you want.
Hope that help,
Brad

Similar Messages

  • Had to start Firefox in safe mode cause it kept crashing after i deleted the file. Now Fire fox Crashes every time I open it and I have to put it in safe mode j

    Had to start Firefox in safe mode cause it kept crashing after i deleted the file. Now Fire fox Crashes every time I open it and I have to put it in safe mode just to use it, also it's not syncing with my iPad.

    If you use Norton software, try disabling your Norton extensions. As of last week, there were severe compatibility issues with Firefox 24.

  • Does any one know how to have a time pulse every some time ?

    does any one know how to have a time pulse every some time to a TimeListener?
    I'm new at java, i encountered into com classes, but i understand they only work on microsoft platform,
    what are the java classes to imlpement this?
    Thank you,
    joy

    That is surprising. java.util.Timer and TimerTask are available since 1.3.
    There is a simple Timer example in Core Java vol II,
    class Timer extends Thread
        public Timer(int i, TimerListener t)
            target = t;
            interval = i;
            setDaemon(true);
        public void run()
            try
                while(!interrupted)
                    sleep(interval);
                    target.timeElapsed(this);
            catch(InterruptedException ie) { }
    private TimerListener target;
    private int interval;
    }The interface TimerListener is quite simple:
    interface TimerListener
        void timeElapsed(Timer t);
    }Implement the Listener in your class where you want the timed pulse.
    HTH,
    Dewang

  • Output pulse every n units for x4 encoder

    I found this on the National Instruments website showing how to ouptu a pulse every N input pulses, the issue is that I'm trying to do this on X4 decoding.  I have a NI9178, NI9401 and a NI9201, I'm trying to input an X4 encoder to my counter and subsequently output a pulse every N steps on a seperate line to trigger an external piece of hardware.   My encoder has 200PPR and runs at about 2000RPM.
    Here's the link to the file:   http://zone.ni.com/devzone/cda/epd/p/id/3288
    Thanks for any assistance you can provide,
    Nick

    So I have been trying to figure this issue out by using the forums and all I've managed to do is confuse myself.
    I'm "simply" trying to output a series of pulses after counting N number of input pulses.  Here is the VI I'm working on (adapted from a previous forum post - Encoder VI for NI.vi is the main program).  There is one counter input and one counter output, along with some analog inputs (which for now can simply be ignored).  I'm trying to count the ticks off of Phase A from the input encoder and subsequently output a pulse every 100 ticks on the output counter task.  
    Please if anyone has any suggestions I am very open to them. 
    Nick
    Attachments:
    Encoder VI For NI.vi ‏54 KB
    Analog Graph2.vi ‏21 KB
    Get Terminal Name with Device Prefix.vi ‏50 KB

  • (pci-6052E) I want to genarate a pulse every time the counter is zero.

    I'm using the counter on my pci-6052E to count the number of pulses on a line. The count goes up and down since I have a direction signal. Now I need and indication (a pulse) every time the count reaches zero. This is similar to the breakpoint function on your motion controllers. Is this possible....

    Yes you can, and here's an example that worked with DAQmx on an E-series board. Ctr0 counts edges of the internal 20 MHz timebase, rolling over to 0 a little more than once a second. It uses the DAQmx Export Signal property node to program the counter to Pulse on reaching TC (terminal count). The pulse signal is sent to a terminal that Ctr1 uses as its source, so Ctr1 increments each time Ctr0 reaches terminal count (0 value).
    -Kevin P.
    Attachments:
    TC Pulse.vi ‏81 KB

  • I want to genarate a pulse every time the counter is zero.

    I'm using the counter on my pci-6052E to count the number of pulses on a line. The count goes up and down since I have a direction signal. Now I need and indication (a pulse) every time the count reaches zero. This is similar to the breakpoint function on motion controllers. Is this possible...."

    Hi,
    You can generate a pulse whenever the counter reaches Terminal Count (TC). You could try setting TC to zero, but I do not think it will work. You can always poll the count in software until it reaches zero.
    Regards,
    RamziH.

  • How do you apply rules based on read status?

    I migrated to Mail.app from PowerMail, and one of the powerful options available when creating a filter/rule in PowerMail was the ability to check the status of the message (message is/is not read) before applying the rest of the rule.
    Is there a way to apply this same check within a rule in Mail.app?
    This option is used to create rules that file mail ONLY AFTER it has been read.
    Obviously, the user must apply the rule manually since rules are only fired off when mail comes in, or when one highlights one or more message(s) and then selects the "Apply Rules" option from the contextual menu or from the Message menu.
    What makes this so powerful is that rather than having to manually file every message after you read it you can create rules that check status for read, if it is check to see if it matches other criteria, and if it does, put it in a folder with other like messages.
    Like many people, I have a large number of folders and subfolders into which I file my messages. By creating such a rule, I only have to file a message that matches other criteria once, use that to set up the criteria for the rule, and on subsequent messages that match that criteria, I only have to apply the rule after I have read it.
    I could just file all the messages directly into their appropriate folders, but then I have to keep watch on the subfolders for new mail, rather than just watching the inbox, reading the new mail, then using the Apply Rules item to have the read message checked and then filed based on the criteria that it matches.
    The logic might look like this.
    Is Read status true
    AND
    The subject contains "Intranet"
    THEN
    Move message to /On My Mac/Work Mail/Current Projects/Intranet Project/ mail folder
    THEN
    Stop processing rules.
    Without the ability to test the message's "read status" I have to select the message, right click to select "Move To>" from the contextual menu, then mouse through four sub panes to put the read message in the folder where I want to store it.
    I also cannot select a number of read messages and use the Apply Rules option to allow my filing rules to move any number of read messages to their proper storage folders.
    If anyone has a method for doing this, please let me know. It is the one thing I miss most about PowerMail.
    Message was edited by: rnsyderpsu

    I have been doing some of this, and while it does provide some of the functionality that is lost without the ability to apply rules only to read messages, it is not a complete solution. One of the biggest drawbacks is that it is not easy to selectively limit what new mail shows up the smart mailbox. One approach that works, sort of, is to limit the smart mailbox to only messages from people in my address book. However, not all relevant messages are from people already in my mailbox, so it requires constantly double checking to make sure that things are slipping through the cracks.
    The best thing about being able to apply rules, after receiving them, based on the status of a message is that it puts the control in the users hands. It allows you to selectively apply rules, only when you want to apply them. Rather than always/never, you have the ability to apply rules "sometimes/as needed." It allows for fuzzy logic, rather than hard conditions.

  • Update Approval Status of parent Folder based on approval status of folder items

    Hi,
    I have a SharePoint list which contains folders. Each folder contains one or more items. I wish to update the folder approval status to "Approved" when all the items inside the folder are approved.
    The workflow should trigger whenever the approval status of one or more items inside the folder is changed and is expected to check the approval status of all other items inside the folder. If all the items are approved the folder's approval status should
    be set to "approved".
    I am designing the workflow via SharePoint Designer 2013 and using SharePoint Online 2013 .
    Thanks a lot in advance.

    Hi,
    According to your post, my understanding is that you wanted to update Approval Status of parent Folder based on approval status of folder items.
    Per my knowledge,
    there is no out of the box way to accomplish this with SharePoint.
    Though we can loop the
    folder items to set the content approval status, we can not get the parent folder and then set the content approval status.
    As a workaround, I recoemend to create event reciever to get set the content approval status of the folder items.
    For more information, you can refer to:
    How to: Create a remote event receiver
    How to create a simple Remote Event Receiver for a Custom List in Office 365 SharePoint 2013 site
    Regarding SharePoint Online, for quick and accurate answers to your questions, it is recommended that you initial a new thread in Office 365 forum.
    Office 365 forum
    http://community.office365.com/en-us/forums/default.aspx
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How to omit records based on a status code

    I am trying to select records based on a status 'N' or 'A' by a certain date as long as by the chosen date there is not another status given to the same course like 'D' or 'X'.
    Here are some sample data...
    CREATE TABLE #TEST
    (ID VARCHAR(7),
    COURSE VARCHAR(10),
    CURRENT_STATUS VARCHAR(1),
    STATUS_DATE DATETIME)
    INSERT INTO #TEST
    (ID, COURSE, CURRENT_STATUS, STATUS_DATE)
    VALUES
    ('0020541','AAAA-1000H', 'X', '2013-08-27 00:00:00.000'),
    ('0020541','AAAA-1000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','BBBB-2000H', 'D', '2013-11-04 00:00:00.000'),
    ('0020541','BBBB-2000H', 'N', '2013-08-27 00:00:00.000'),
    ('0020541','CCCC-3000H', 'D', '2013-09-11 00:00:00.000'),
    ('0020541','CCCC-3000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','DDDD-4000H', 'A', '2013-08-25 00:00:00.000'),
    ('0020541','EEEE-5000H', 'N', '2013-08-26 00:00:00.000')
    SELECT * FROM #TEST
    DROP TABLE #TEST
    If the query is to determine how many records with a status of N or A up to and incl August 26, 2013, I should see 4 records... AAAA-1000H, CCCC-3000H, DDDD-4000H, EEEE-5000H
    If the query is to determine how many records with a status of N or A up to and incl October 1, 2013, I should see 3 records... BBBB-2000H,  DDDD-4000H, EEEE-5000H
    ...and so on.
    Any help is appreciated.

    I am trying to select records based on a status 'N' or 'A' by a certain date as long as by the chosen date there is not another status given to the same course like 'D' or 'X'.
    Here are some sample data...
    CREATE TABLE #TEST
    (ID VARCHAR(7),
    COURSE VARCHAR(10),
    CURRENT_STATUS VARCHAR(1),
    STATUS_DATE DATETIME)
    INSERT INTO #TEST
    (ID, COURSE, CURRENT_STATUS, STATUS_DATE)
    VALUES
    ('0020541','AAAA-1000H', 'X', '2013-08-27 00:00:00.000'),
    ('0020541','AAAA-1000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','BBBB-2000H', 'D', '2013-11-04 00:00:00.000'),
    ('0020541','BBBB-2000H', 'N', '2013-08-27 00:00:00.000'),
    ('0020541','CCCC-3000H', 'D', '2013-09-11 00:00:00.000'),
    ('0020541','CCCC-3000H', 'N', '2013-08-26 00:00:00.000'),
    ('0020541','DDDD-4000H', 'A', '2013-08-25 00:00:00.000'),
    ('0020541','EEEE-5000H', 'N', '2013-08-26 00:00:00.000')
    SELECT * FROM #TEST
    DROP TABLE #TEST
    If the query is to determine how many records with a status of N or A up to and incl August 26, 2013, I should see 4 records... AAAA-1000H, CCCC-3000H, DDDD-4000H, EEEE-5000H
    If the query is to determine how many records with a status of N or A up to and incl October 1, 2013, I should see 3 records... BBBB-2000H,  DDDD-4000H, EEEE-5000H
    ...and so on.
    Any help is appreciated.
    I guess I didn't understand your problem. Not sure if this might help you.
    SELECT * FROM #TEST
    where CURRENT_STATUS IN ('N','A') AND STATUS_DATE<='2013-08-26'
    AND STATUS_DATE NOT IN(Select STATUS_DATE from #test
    where CURRENT_STATUS IN ('D','X'))
    SELECT * FROM #TEST
    where CURRENT_STATUS IN ('N','A')
    AND STATUS_DATE<='2013-10-01'
    AND STATUS_DATE NOT IN(Select STATUS_DATE from #test
    where CURRENT_STATUS IN ('D','X'))
    - please mark correct answers

  • Prorate calculation based on Martial status

    Dear Experts,
    We have two types of the minimum of Housing Allowance(IT0014 - HA01WT):
    1.        1000 Monthly for Single
    2.        1500 Monthly for Married
    And this changeable based on Marital Status Key on Info Type 0002. However; if the change of Marital Status happened in the middle of the month the Housing Allowance should be calculated on a pro rata basis.The System gives the employee the new Housing Allowance in full. Please provide me the logic or operation that we can use in the PCR
    Pls let me know for any further clarification
    Regards
    SB

    I found solution on my own. please find below the rule
    TABLEP0002 Read table fields
    VARGBFAMST Tab.field VVVVV v.ky
      1
        WPALL?LAST ID = LAST?
          N
          Y
            AMT?IZSHNG Comparison
                ADDWT *    OT   Output table
              <
                RTE=FZ7N   Set
                RTE?1      Comparison
                  =
                    ZERO= NRA  AmtNumRteTime = 0
                    RTE=FZ7T   Set
                    AMT=IZMHNG Set
                    MULTI RAA  Multipl.amt/no/rate
                    AMT/TKDIVI Division
                    ADDWT 1001 OT   Output table
                    RTE-TKDIVI Subtraction
                    RTE*-1     Multiplication
                    AMT=0      Set
                    AMT=IZSHNG Set
                    MULTI RAA  Multipl.amt/no/rate
                    AMT/TKDIVI Division
                    ADDWT 1001 OT   Output table
                  >
                    AMT=IZMHNG Set
                    ADDWT *    OT   Output table
    Now its calculating based on prorate basis for both single and married status...
    Regards
    Sanjai

  • Transaction authorization based on document status

    Hi,
    We need to give display only access to end users (i.e specific business roles) based on the status of the document, for e.g. if document status is IN PROCESS the end user should only be allowed to Display the document - how can this be achieved ? Helpful inputs asap plz. Thank you.
    Best Regards.

    Hi Robert,
    Thanks for the quick reply, I will go through the said changes and update the thread accordingly in a day or two. Thanks again.
    Best Regards.
    Still waiting to test the solution, will update the thread soon !
    Regards.
    Edited by: Jacob Raj on May 2, 2011 2:02 PM

  • Shipment Output determination  based on shipment status.

    Dear all,
    In  T code VT01N   we are facing some issue.
    The issue is like when am selecting the Shipment button and saving  at that time the  output type is trigging.
    Actually the output type should trigger only after the shipment completion.
    Could any one kindly suggest any way for Shipment Output determination  based on shipment status.
    <removed by moderator>
    Thank you,
    Niketh
    Edited by: Thomas Zloch on Oct 8, 2011 8:21 PM

    I think you have to write your own REQUIREMENT CODE under the outpout type .

  • Workflow - based on idoc status workflow have to trigger

    hi,  i generating IDOC using abap program, when i generated IDOC workflow triggering, my recruiment is based on IDOC status
    workflow have to trigger, eg success status 30 means mail have to go one person, if fail means mail as to go another person. I trying for last two days any one can help me.

    Hi Rajendra,
    You need to trigger workflow only if u require any approval/Rejection.
    If you just need to send a mail on idoc status 30 or fail status, u need not to trigger workflow.
    You can do it with the help of standard FM also. Just search by putting Mail or sendmail* in t-code SE37, you will surely get an relevant FM which you can use in Condition of Status of idoc.
    Hope it will help u.
    Regards
    Nitin

  • Availability of products based on product status

    Hello
    I have the following requirement that needs to be implemented in CRM 7.0.
    "Based on product statuses, we'd like to stipulate which product can be used for new orders and which products can be used only for change orders."
    For example let's say product X was created on Jan 1 2009.  Quotes/Sales orders were created for this product.  Buit in June 2009, this product should only be available for change orders.  It should not be available for new quotes/sales orders.
    I've looked through product statuses and read several posts on this forum. But I didn't quite understand what thought process I should have to implement this.
    Any guidance would be greatly appreciated.
    Thanks

    Thanks for your reply.  I see what you're saying.  The product status would still be active.  Otherwise the product won't be available for use at all.
    If that is the case, then which attribute of the product could I use/should I use, to prevent the product from being used on new orders (but usable on change orders)?
    Thanks

  • Can I Control Follow Up Transactions based on the Status ?

    Hi,
    I have created follow-up transaction (Quote) for main transaction Opportunity (this is custom defined transaction). I am able to create the follow-up transaction alright. However, now I would want to restrict the creation of follow up transaction based on the status of Opportunity. E.g if the Opportunity status is "Open" then I should not be able to create the follow-up transaction, wheras if the Opportunity status is "Won" then I should be able to create the follow-up transaction.
    Any help will be highly appreciated.
    Regards,
    Diptendu

    Write this restricting condition in COPY or OPPORT_H method of CRM_COPY_BADI. Raise an error message when status is not as desired which will stop the creation of follow up document. Do not forget to filter for transaction type i.e. process type. Also to make it exclusive for creation of follow up document (not code for copy control also), put some other condition checking docflow or something.

Maybe you are looking for

  • ProcessOrder API not populating the Price from the pricing attribute setup.

    Hi, I am having a problem while adding a line on the existing order through the Oe_Order_pub.Process_order API. A line is added but the pricing is not fetched using the pricing attribute. I have passed calculate_Price_flag=’Y’ but in vain. I am not p

  • Punished for On-Line Bundle Upgrade?

    I've upgraded my FiOS bundle (phone, Internet & TV) three times now. The first two were via phone call to FiOS sales. Piece of cake - friendly, enthusiastic staff; clear explanations; fast turn-around with upgraded services operational by the time I

  • Problem in Hierarchical Sequential List

    Hi All, I am developing an Hierarchical ALV List using OOABAP. In the output list, I have a checkbox to be displayed. I have taken the cell type as "CHECKBOX", it is displaying as disabled. I searched some sites for the resolution, it is mentioned if

  • Errro in Flex  1.5 Application

    Hi, I have created an mxml file in that i used Canvas. i have 12 different forms in that, each i am loading at different time. And also i used validation scripts totally the file containing of more than 680 lines while compileing that i got the ERROR

  • Auto-numbering of item field in custom table for EEW enhancements for BUPA

    Hi Experts, We have a requirement to generat 3 custom tables in EEWB,for BUPA and assigned it to BP_HEAD. I have done all the generations and it works fine, the problem  is that the tables that are generated is not allowing us to have a data(material