Announcement

Collapse
No announcement yet.

CPoE

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • CPoE

    Using P1K FW1.2.5.36 SW3.0.1.1

    Motorola/Symbol Serial barcode scanner (RS232)
    GridConnect NET232+ Serial<->Ethernet adapter

    If CPoE instruction is disabled when I scan a barcode, I get the barcode data when CPoE enable goes true. Understood.
    If multiple barcodes are scanned while CPoE is not enabled, I get a flood of barcode data upon enabling CPoE. Understood.

    I want to flush any previously scanned barcode data upon enabling the CPoE instruction.

    I have a workaround. But... If there is a 'uniform' / 'standard' way to flush the data, it would be better for me to do it that way. Mine is a bit convoluted - but 'functional.'

    The string "O08R100000O08R3" contains 3 barcode scans. O08R1, 00000, and O08R3.

    The tag SIM_BCS_CLEAR_AT_En allows the flush rungs (3-6) to clear the incoming ethernet 'buffer?' or 'stack?' (whichever is appropriate.)

    Click image for larger version

Name:	CPoE_Flush.png
Views:	49
Size:	71.0 KB
ID:	109766


  • #2
    We are trying to figure out from the info you given if we are buffering the messages or the scanner is. If we were buffering them we would expect when you enabled the CPoE instruction on the first scan it was enabled it would read the first barcode, next scan would read the second barcode and overwrite the first in the string, and third scan would read the third barcode and overwrite the second in the string. So at the end you would only have the first barcode. But that does not look like what happened. ( 8 queues and uses a first in first out method.)

    Can you do the following:

    1) Scan one barcode with the CPoE instruction disabled.
    2) Look at the BCS_Ser_Eth.MessagesPending tag in dataview and see what it is. ( Should be 1)
    3) Enable the CPoE and look at the BCS_Ser_Eth.MessagesPending tag in dataview and see what it is. (Should be 0)
    Do the same for the three barcodes.
    4) Scan the three barcodes with the CPoE instruction disabled.
    5) Look at the BCS_Ser_Eth.MessagesPending tag in dataview and see what it is. ( Should be 3) If it is not three then the scanner or converter is not sending with each barcode scan.
    6) Change the enable for the CPoE to a one shot. Enable the CPoE and look at the BCS_Ser_Eth.MessagesPending tag in dataview and see what it is. (Should go down by one each time the enable is triggered.)
    Last edited by PSeries_Eng; 12-15-2017, 04:46 PM.

    Comment



    • #3
      Hey, Thank you for the interesting response! I can do the listed suggestions.

      I can put an 8 channel logic analyzer on the serial pins to see the comms/handshake signalling.
      If time allows, I can get wireshark to provide messaging details, too.
      I will have to wait until Monday. I will do as you ask.

      Comment



      • #4
        Also note that if the barcodes are variable lengths and you read one that is 10 characters and the next is only 5 characters the 6-10 characters from the previous barcode will remain and look like they are appended to the second barcode.

        Comment



        • #5
          Originally posted by PSeries_Eng View Post
          Also note that if the barcodes are variable lengths and you read one that is 10 characters and the next is only 5 characters the 6-10 characters from the previous barcode will remain and look like they are appended to the second barcode.
          I generated all of my test barcodes. They are all 5 characters (code39)

          will remain and look like they are appended to the second barcode
          I have noticed. Not a problem. Thanks

          Comment



          • #6
            I tried about an hour to duplicate PSeries_Eng instruction/results. No luck.

            I was using the same enable bit for the INSTRUCTION and the DEVICE.

            If I use separate enables, I get the results that PSeries_Eng suggests for the same process.

            Request, please make a note of this in future help files.

            ( 8 queues and uses a first in first out method.)
            Is this related to MessagesPending? If so, I count to 10 then get Overflow.

            Continuing on with the original question: Is there a way to purge/flush any data that was scanned while either the INSTRUCTION or the DEVICE is disabled?
            My current idea is:
            On rising Enable, set Memory.
            Delay to allow a message to be processed (one per scan)
            While Memory and Dwell is complete, consume/discard any scans in the ethernet queue.
            If messagestringLength is NONZERO clear messagestring.
            When messagestringLength is ZERO reset Memory.
            Continue normal operation.


            Thanks.



            Comment



            • #7
              Request, please make a note of this in future help files.
              You want us to say in the help file that the CPE device must be enabled before sending it data?

              ( 8 queues and uses a first in first out method.)
              Is this related to MessagesPending? If so, I count to 10 then get Overflow.
              Yes the help file is wrong here it says 8 and there are 10 it also says "first in last out" and it is actually "first in first out" , these will be corrected.

              Continuing on with the original question: Is there a way to purge/flush any data that was scanned while either the INSTRUCTION or the DEVICE is disabled?
              My current idea is:
              On rising Enable, set Memory.
              Delay to allow a message to be processed (one per scan)
              While Memory and Dwell is complete, consume/discard any scans in the ethernet queue.
              If messagestringLength is NONZERO clear messagestring.
              When messagestringLength is ZERO reset Memory.
              Continue normal operation.
              As with most plc code there are multiple ways to get to the same point. What I was trying to point out with the steps I gave you was that the pending message can be used to see if there are multiple bar codes in the queues. So if you see there are 3 pending messages you would know that more than one bar code had been read or that more than one message had been sent to the plc from that device. You could then use a separate CPoE message to flush the queues to a string that is a "Junk" data string or into a string array if the data may need to be saved. There is no checkbox like with the ASCII in instruction to flush the Queues before receiving. We will discuss with developers and see if adding this is possible for the custom protocol over ethernet as we see where it could be helpful.

              Comment



              • #8
                You want us to say in the help file that the CPE device must be enabled before sending it data?
                No, not that. A caveat concerning using the SAME enable bit for the INSTRUCTION and for the DEVICE may return undesired results.

                As with most plc code there are multiple ways to get to the same point. What I was trying to point out with the steps I gave you was that the pending message can be used to see if there are multiple bar codes in the queues. So if you see there are 3 pending messages...
                That answers my question. Not a right or a wrong way, but a way to accomplish said task.

                Thanks again!

                Comment

                Working...
                X