
adccommunitymod (AutomationDirect) asked a question.
Created Date: September 06,2018
Created By: kewakl
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
PAC sw 2.4.4.1 P3-550 fw 1.1.13.17 I have this task: . . . | .------------------------+------------+ 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.
Created Date: September 06,2018
Created by: kewakl
PAC sw 2.4.4.1
P3-550 fw 1.1.13.17
I have this task:
.
.
. |
.------------------------+------------+ 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.
Created Date: September 06,2018
Created by: ADC_CommTeam02
The issue is the first CMPS you are comparing only the first 25 characters which is then causing the event changed bit to be true on every scan. Thus not allowing the newproject alert or newprog_test tags to be reset from dataview. If you disable the first rung then you are able to reset both of those of those tags.
Created Date: September 06,2018
Created by: techme
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.
Created Date: September 06,2018
Created by: kewakl
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.
Created Date: September 06,2018
Created by: techme
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.
Created Date: September 07,2018
Created by: kewakl
@ techme, your observations were spot on!
{ "data-align ": "none ", "data-size ": "large ", "data-attachmentid ":117590} I conflated the 'Equal ' in the CMPS to the state of my output tag! It went sideways from there!