8 Replies Latest reply on Aug 17, 2011 11:41 AM by philmodjunk

    How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced

    xtremu

      Title

      How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced

      Post

       Hi guys,

      I am preparing a simple TimeStart and TimeEnd database for the Technical Training School students.

      I have two tables: Student and AccessLog table and having a working relationship. LS9208 scanner was also properly connected to the computer.

      Tables have their own respective fields and its works fine now, keeping time of each student entry in/out in the AccessLog table.

      The Student table used the global field (gStudentNumber) to wait and scan the entries barcode.

      I used script trigger OnObjectEnter/OnObjectExit to automate the script, at the same time assigned enter/return in the inspector behavior but still it doesn’t work. The scanner read the barcode automatically and it stop there and need to hit the enter key before it process the script.

      Thanks and waiting for any suggestions. More power FM.

      xtremu

                                                 

        • 1. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
          xtremu

          Phil thanks for the reply, anyway I was accidentally close the comments action for my post that's why you cannot reply. I change already the settings for you to make a reply. Anyway what is the missing script? I have no manual of LS9208 barcode scanner. It is posible that the script from Filemaker can also do that tricks instead of using the "return" under behavior setting or without using the append character at the end of the scan text?

          Please provide the missing script of the code that i've provided on my previous post..

          Please help.

          thanks

          • 2. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
            philmodjunk

            This is a setting on the scanner. You'll need to figure out how to configure the scanner to do this. It's not a filemaker setting, nor a script.

            The alternative might be to use OnObjectKeystroke or OnObjectModify to count the number of characters as the data is scanned in and then this script can process the scanned data to check someone in or out when the correct number of characters are entered. Have never tried that as it seems ineffiecient, but if you can't contact the scanner manufacturer for some tech support, it may be worth experimenting to see if it will work for you.

            The script might look something like this:

            IF [ Length ( Student::gStudentNumber ) = 8 // (if your barcodes are 8 characters long)]

                # put code to process your scanned data here

                #clear field for next scan
                Set Field [Student::gStudentNumber ; "" ]

            End If

            • 3. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
              xtremu

              Hi Phil,

              I followed your suggestion to add If [Length (Student::gStudentNumber) = # in the script that I posted before and also use the OnObjectKeystroke or OnObjectModify in Script Trigger but it only works the same as what happened before. I need to hit the ENTER key before it process the found scan data in the gStudentNumber field. Clearing the gStudentNumber field for next scan is now ok Phil, it looks good. But still Im trying to figure out how to process the data without hitting the ENTER key after scanning it in the gStudentNumber field. Any suggestion Phil? Script look like this:

              Freeze Window

              Loop

              Go to Field [Student::gStudentNumebr]

              Pause/Resume Script [Indefinitely]

              If [Length (Student::gStudentNumber) = # (let say 2,4,6, etc)

              ..............

              ............

              ...........

              End If

              Set Field [Student::gStudentNumber; ""]

              End Loop

               

               

              Please help

              Thanks.

              • 4. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
                philmodjunk

                The enter key is resuming your paused script. You'll need to modify your script so that it does not operate in this loop with the pause if you do not modify your scanner settings to provide the Enter key character needed to resume the script after the pause.

                You can use a "start scan" script with a single line:

                Set Field [Student::gStudentNumber; ""]
                Go To Field [Student::gStudentNumber]

                Your OnObjectModify triggered script can contain your current script starting with If [Length...

                Then add Go To Field [Student::gStudentNumber] as the last step in the script to put the cursor back into the global field.

                No loop needed.

                • 5. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
                  xtremu

                   Hi Phil, I removed already the LOOP operation and I follow the two steps at the beginning of script and use the OnObjectKeystroke to trigger the entire script. It works fine now but then the Pause/Resume script is still there and we need to hit the ENTER key again to process the script before displaying us the Output that we wanted. If I removed the Pause/Resume script while still using the OnObjectKeystroke, it will scan the barcode but it did'nt find any record or information from the database. I tried to add/ removed some of the scipt but no luck from that. Can you please identify what is wrong with the script to run without hitting the ENTER Key? As what you mentioned before that the ENTER key response the Pause/Resume script that I provided in the beginning of the script, but if I removed that nothing happened it only read the barcode without finding and recording the time in the AccessLog table.

                  Please help.

                  Thanks

                  Desired Output Phil,

                   

                  Let say;

                  Student ID             TimeStart             TimeEnd              Date

                  201120350             3:15:00 PM          3:20:00 PM          Tue, Aug 16, 2011

                  201120351             3:15:10 PM          3:20:20 PM          Tue, Aug 16, 2011

                  201120350             3:30:25 PM          4:20:00 PM          Tue, Aug 16, 2011

                  201120355             4:35:00 PM          6:20:00 PM          Tue, Aug 16, 2011

                  If you want to search the Student ID or Student Number how many time she/he entered then of it looks like this,

                  Example: Search Student ID or Student NUmber 201120350, result look like this.

                  201120350             3:15:00 PM          3:20:00 PM          Tue, Aug 16, 2011

                  201120350             3:30:25 PM          4:20:00 PM          Tue, Aug 16, 2011

                  ..................

                  ..................

                  # of times he/she entered/ scan his/her ID.

                   

                   

                   

                   

                   

                   

                   

                   

                  • 6. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
                    philmodjunk

                    Please delete the first 4 lines of your script. They aren't needed now that other triggered script works.

                    • 7. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
                      xtremu

                       Hi PhilModJunk thank you so much for the quick and awesome replied, my system works perfect now.  Your the man Phil. Anyway one thing Phil, what if the Student Number would have 7,8,9,10 or 11 characters because of the incremental number of students, Of course assigning to length, for example = 9, the rest won't work right? What should be the script do I need to add if that is the case Phil?

                      Thanks again.

                      xtremu

                      • 8. Re: How to automate LS9208 Symbol Barcode Scanner in FileMaker Pro 11 Advanced
                        philmodjunk

                        That's why I've recommended configuring your scanner to append a tab, return or enter character to the end of the scanned data. That way you can set up field behavior on this field to have this character exit the field and then the OnObjectExit trigger can perform your script and the length of the code does not matter.

                        If you don't do that, I suggest you come up with a barcode that is always the same length. One way to do that is to add leading zeroes to yoru bar coded numbers.