Announcement

Collapse
No announcement yet.

PAC Suite String instructions

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


  • PAC Suite String instructions

    PAC sw 2.4.4.1
    P3-550 fw 1.1.13.17

    I have this task:
    Code:
    .
    .
    .                                     |
    .------------------------+------------+ CMPS
    .                        |            | Input 1  CPU Event Log String 01          Equal EventChanged
    .                        |            | Input 2  OldEvent
    .                        |            | Num Ch   25
    .                        |            +---------------------------------------------------------------
    .                        |
    .                        |
    .                        |            |
    .                        +------------+ CPD
    .                                     | Source                               Destination
    .                                     | CPU Event Log String 01              OldEvent
    .                                     +---------------------------------------------------------------
    .
    .     EventChanged                    |      
    .--------] [-------------+------------+ EXTS
    .                                     | Source                               Destination
    .                        |            | CPU Event Log String 01              NewProj_Test
    .                        |            | Start Index 15
    .                        |            | Num Ch       8
    .                        |            | No byte swap
    .                        |            +---------------------------------------------------------------
    .                        |
    .                        |            |
    .                        +------------+ CMPS
    .                        |            | Input 1  CPU Event Log String 01          Equal NewProject_Alert
    .                        |            | Input 2  "NEW PROJ"
    .                        |            | Num Ch   8
    .                        |            +---------------------------------------------------------------
    .                        |
    .                        |            |
    .                        +------------+CPD
    .                                     | Source                               Destination
    .                                     |   0                                  EventChanged
    .                                     +---------------------------------------------------------------
    .
    .
    When the 'EventChanged' is not true, I cannot reset the 'NewProj_Alert' status bit, and I cannot clear the 'NewProj_Test' string value -- From DataView
    The above happens on P1K using sw 3.2.2.4 fw 1.2.5.36

    (NOTE: I just got interrupted, and may revise this post!)

    Further testing:
    If I change N.O. EventChanged to NOE-rising EventChanged, I can reset NewProj_Alert, but the code DOES NOT clear EventChanged, and I cannot reset EventChanged from DataView.
    I have not confirmed the results of the further test on the P1K.
    Last edited by kewakl; 09-06-2018, 02:32 PM.


  • #2
    In your second rung it looks as if your CMPS instruction Input 1 tag should be NewProj_test not cpu event log string 01. If you change this and use the NC contact for your event changed instruction on your second rung I think it will work as you want it to. Although it will only detect one new project transfer per minute.

    Comment



    • #3
      Thanks for the response!
      I need to check tomorrow, I maybe selected an incorrect tagname while doing my ascii program translation. I gave the snippet to another dev and it worked for his application.

      My issue is that the CMPS status bit cannot be cleared in dataview when the (N.O.) EventChanged tag is false.
      And when I use the rising edge of the EventChanged tag, I can clear the CMPS status bit, but then cannot clear the EventChanged bit. It worked in code.

      Purpose of code: Polling ~8 ModbusTCP 80-channel analog remote input modules, and when transferring project, the comms hangs. Since there is no system status bit to indicate program change, I used the event log text change for this purpose.

      Comment



      • #4
        The issue with your logic( other than the tag I mentioned) is that the first compare string instruction will always make the "Event Changed" status tag true after you copy to the old event tag. So when you get to the next rung it will always do those instructions ( even though you reset it with the cpd instruction in the second rung) That is why it cannot be cleared in dataview you are always turning it back on. So what you should really be looking for is the one scan where it is not equal before you copy to the other register.

        Actually if you do it the way I am saying you can delete the last cpd instruction and it will still work. the first CMPS will act as a one shot.

        Comment



        • #5
          @ techme, your observations were spot on!
          Click image for larger version

Name:	ProjChange.png
Views:	21
Size:	18.3 KB
ID:	117590 I conflated the 'Equal' in the CMPS to the state of my output tag! It went sideways from there!

          Comment

          Working...
          X