Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    NexeedScanner / NexeedIpScanner

    NexeedScanner / NexeedIpScanner

    tommy3000
    Established Member

    Hello together

    I have an handheld scanner in my station and I need to have it always in the reading command.
    I want to start the command read and wait as long as something was scanned, to analyze the data.

    At the moment, I have to define a timeout for the max time of staying in read command. Is there a possibility to set up the object, that there is no timeout for the reading command?

    I tried to build something on my own, with resetting the command before the timeout error is coming, but then I have a unreliable behaviour with the scanner, sometimes the first scan after resetting the command will be ignored, so I always have to scan twice.

    Is this possible for handheld scanner?

    Thanks in advance

    8 REPLIES 8

    maj9bj
    Long-established Member

    I think the right way how to operate the handheld scanner is to create a subchain or help method with CASE construction called from OnunitOperational. In one of these you should execute the read command, set a timeout and when the timeout is reached you should reset Execute and run the whole sequence again.

    And as you wrote, you should reset the Execute signal before reaching the object timeout. So your timeout in the sequence should be shorter.

    Let me know if it works and if not I will try to find some of our projects with implementation of this.

    Düscha
    New Contributor

    Hello,

    actual peripheral for TCP not supported handheld function.

    we plan add this function to the tcp peripheral in the future like the serial peripheral.

    tommy3000
    Established Member

    Yes that's how I tried it, but I have the problem, after resetting the execute the first scan won't be read. After that it is working, but with some additional checks, like connection still there.

    If you have have a running template, would be great to have it.

    Thanks

    maj9bj
    Long-established Member

    I found this in one of our projects. It is from real machine, which normally runs, so it should be ok.

    Maybe the clue for your problem is additional empty step 2. Object probably needs one PLC scan to process something inside of it.

    What I do not understand is, why timeout is not implemented in step 1.

     

    CASE _step OF
    
      0: // Start command
        IF ( Scanner1.Unit.ExecState = OpconExecState.READY )
        THEN
          Scanner1.Unit.Command := ScannerCmd.READ;
          Scanner1.Unit.Execute := TRUE;
          _step := _step + 1;      
        END_IF     
     
      1: // Wait until finished
        IF ( Scanner1.Unit.ExecState <> OpconExecState.RUNNING )
        THEN
          Scanner1.Unit.Execute := FALSE;
          _step := _step + 1;
        END_IF
        
      2: // End step
        _step := 0;
        
      ELSE
        Scanner1.Unit.Execute := FALSE;
        _step := 0;  
    END_CASE

     

     

     

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist