Jump to content

Recommended Posts

Ladies and Gents,

 

I have a program where I am triggering an analytical measurement with either an HMI button, or via a timer for unattended operation. 

 

I have 7 other timers running in the project, all working flawlessly.  Additionally, I feel that the logic I used for this is sound - it already works fine on my data logging routine.  Attached are two screen captures, one of the ladder for the Analytical trigger (not working), and the working data logging ladder.

 

With respect to T8, when in online mode, I can see that the contact conditions are all working as expected, and the timer is counting down from 1 minute to zero and restarting at 1 minute as long as my contacts are good.  However, in online mode, it appears that the T8 contacts in Nets 1, 2 never change state to high conditions at T=0.  The HMI trigger (MB310) works as expected.  All ladder instances of MB310, Mb50,51, and T8 appear only in this subroutine.  The HMI links are just for the respective MBs (one pushbutton each), and a timer entry for T8.

 

I'm going crazy with this.  I have got to be overlooking something so stupid and/or obvious.  It's hot on the East Coast - I owe whoever can help with this a cold one.....

 

Thanks,

Rich

post-19181-0-37741800-1469371313_thumb.jpg

post-19181-0-46369800-1469371322_thumb.jpg

Link to comment
Share on other sites

Hello Rich,

 

Are you sure the subroutine is running?  Is it against teh main rail in the main routine, or are there conditions for the subroutine to run?

 

Can you place an incremeting function block at teh end of net 1 and 2 to see if they are being evaluated?  The incrementers should increment (net 1 with scan time, net 2 with timer value) if this subroutine is being called.

Link to comment
Share on other sites

Hey - thanks for the quick reply.

 

The subroutine is running (called from main routine, no conditions).  I added the incrementers, (wich is a great idea!),  and they are working.  The Net 1 incrementer runs when power is supposed to flow, Net 2 incrementer advances at the completion of the timer cycle.  But even with the incrementer seeing a pulse in NEt 2, the timer state does not (visibly) change and the  output is not triggered.

 

I confirmed with the increment blocks in place that the manual trigger (MB310) does in fact trigger the output and increment Net2.  It's got to be something funky with the timer....

Link to comment
Share on other sites

Hey - thanks for the quick reply.

 

The subroutine is running (called from main routine, no conditions).  I added the incrementers, (wich is a great idea!),  and they are working.  The Net 1 incrementer runs when power is supposed to flow, Net 2 incrementer advances at the completion of the timer cycle.  But even with the incrementer seeing a pulse in NEt 2, the timer state does not (visibly) change and the  output is not triggered.

 

I confirmed with the increment blocks in place that the manual trigger (MB310) does in fact trigger the output and increment Net2.  It's got to be something funky with the timer....

 

Hello Rich,

 

Since it is a one-shot output from the timer (only on for one scan) you may not see this logic perfom while online with the PLC - it may be happening much too fast for the communciations to catch this logic.

 

What kind of output are you triggering?  You may not be seeing anything come from the output since you are only triggering it for one scan - it may need to be on for longer to see an output.  What is this output triggering?

Link to comment
Share on other sites

Gabriel and Shane,

 

Thanks a million for the input.  As Gabriel suggested and Shane intuited, the output needed a (S) coil.  It is triggering a 24VDC digital out to an external dry contact, so the one scan was not enough.  I should have known it.  I guess what tripped me up was not seeing the power rail change color like it does on my logging routine.  After I added the incrementers, it should have been pretty obvious the code was working fine.

 

I have posted the working resultant code, in case someone searches for this timer problem in the future.  And I'm also posting a virtual craft beer for Gabriel since I have no way to get one to Colombia.

 

Thanks again !

 

post-19181-0-76276000-1469458944_thumb.jpg

post-19181-0-06394100-1469459097_thumb.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...