You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 15th, 2022, 03:05 PM   #16
Jlandwerlen
Member
United States

Jlandwerlen is offline
 
Join Date: Jan 2022
Location: Atlanta
Posts: 57
Quote:
Originally Posted by drbitboy View Post
Interesting, because that has worked for me in the past (i.e. [MOV 0 blah.ACC]).
It did work but just like doing a reset the counter incremented. The whole issue is around keeping the trigger high while doing a reset.
  Reply With Quote
Old January 15th, 2022, 10:00 PM   #17
cwal61
Member
United States

cwal61 is offline
 
Join Date: Jan 2011
Location: NC
Posts: 1,193
Use the CLR instruction on the CTU ACC. This will leave the CU bit set and reset the CTU ACC to 0.

XIC CTU.DN CLR CTU.ACC
  Reply With Quote
Old January 15th, 2022, 11:18 PM   #18
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 4,974
Diagnosing the process, one scan at a time; see images below.

.ACC /DN /CU Trigger
(1) 2 0 0 0 Logging starts, ~5ms before count from 2 to 3
(1a) 2 0 0 0 Logging scans over ~5ms until trigger becomes 1
(2) 2 0 0 1 Scan of trigger rising edge and before count;
/CU is 0 while trigger is 1 => rising edge
(3) 3 1 1 1 Scan of trigger rising edge and after count;
count (.ACC) is 3 = .PREset so /DN is 1;
RESet will occur on last rung of this scan
(4) 0 0 0 1 Scan after trigger rising edge and before count;
RESet has assigned 0 to .ACC and 0s to all status bits,
/DN and /CU specifically are now 0s
(5) 1 0 1 1 Scan after trigger rising edge and after count;
since /CU was RESet to 0, trigger value of 1
is detected as another rising edge on this scan,
even though trigger was 1 on last scan
(5a) 1 0 1 1 Subsequent scans over the next ~100ms; no change




xxx.png

yyy.png
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
  Reply With Quote
Old January 15th, 2022, 11:44 PM   #19
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 4,974
Quote:
Originally Posted by ceilingwalker View Post
Tried this also......same result.

Hmm, maybe Logix 5000 is different from MicroLogix:

.ACC /DN /CU Trigger
(6) 0 1 1 1 Scan after trigger rising edge and before count;
CLeaR has assigned 0 to .ACC, but all status bits are unchanged,
/DN and /CU specifically are still 1s
(7) 1 0 1 1 Scan after trigger rising edge and after count;
count (.ACC) is still 0 i.e. there has been no "false count" to 1
because /CU is still 1;
/DN has become 0 since .ACC is less than .PRE.
(7a) 1 0 1 1 Subsequent scans over the next ~100ms; no change



Attached Images
File Type: png xxx.png (53.5 KB, 26 views)
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Micro 850 Accumulator reset Jody Collins LIVE PLC Questions And Answers 0 February 8th, 2017 10:20 AM
Mitsubishi Beginners question - System Reset DecrepitDragon LIVE PLC Questions And Answers 4 June 1st, 2015 10:06 AM
Mitsubishi F1 series counter question. Tharon LIVE PLC Questions And Answers 4 March 5th, 2015 04:48 PM
Manual vs. Automatic Reset jrexrode LIVE PLC Questions And Answers 14 January 20th, 2015 05:49 PM
RSLinx and yellow question marks. johnmac LIVE PLC Questions And Answers 2 October 14th, 2014 12:32 PM


All times are GMT -4. The time now is 04:11 AM.


.