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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 21st, 2004, 01:53 PM   #1
Clubbe
Member
Canada

Clubbe is offline
 
Join Date: Dec 2004
Location: Guelph, Ontario
Posts: 4
one-shot with CompactLogix

I'm an Allen-Bradely nube... please bear with me.

I'm dealing with a CompactLogix 1769 for the first time. In an attempt to deal with the the 1769's asynchronous I/O behaviour, I've set up logic to copy the input to buffer variables at the start of a cycle, and copy buffer data to the outputs at the end of cycle.

Now my problem arises when I attempt to fire a one-shot to one of my outputs:

|   goHome                           |

|----] [---------| OSR            |--|

|                | SB: workBit[0] |  |

|                | OB: workBit[1] |  |

|                                    |

| workBit[1]               Home      |

|----] [--------------------( )------|

|                                    |



While in RUN mode, I toggle "goHome" with varying results. Often I will get no result whatsoever, but every so often "Home" will actually fire (usually after 3 or 4 ineffective toggles).

I'm stumped... any suggestions would be greatly appreciated.

Thanks
  Reply With Quote
Old December 21st, 2004, 02:09 PM   #2
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,463
Greetings Clubbe,

first of all ... how do you KNOW whether the “home” bit is firing or not? ... basic idea, if you’re just going by the “green on the screen” then you need to know that you can easily be misled by that method ... secret handshake: the screen is updated through the communication cable – which can’t move data fast enough to be “real time” ...

suggestion: just for testing purposes, change the “home” bit to a “latch” instruction ... this will come on and STAY ON if it fires even for just one scan ... I’m betting my pocket change that your “home” has actually been firing each and every time that you tested it ... but you just missed the indication on the screen ...

next ... a suggestion ... you’ll probably find it a lot easier to work with the ONS type of “one-shot” ... if your system supports it ...

good luck ... and welcome to the forum ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old December 21st, 2004, 02:18 PM   #3
Clubbe
Member
Canada

Clubbe is offline
 
Join Date: Dec 2004
Location: Guelph, Ontario
Posts: 4
Sorry, should've been more specific:

When I said that "Home" fires, I meant to say I get actually output to my linear sliders (in this case, they return to their Home positions).

I tried the ONS instruction as well, but I get very similar behaviour.

Am I not understanding the nature of I/O buffering and scan times?
  Reply With Quote
Old December 21st, 2004, 02:28 PM   #4
jvdcande
Member
Belgium

jvdcande is offline
 
jvdcande's Avatar
 
Join Date: Apr 2002
Location: Menen
Posts: 2,178
Clubbe,

it's not hard to understand, provided you keep in mind that all Logix5000 controllers (e.g. CompactLogix and ControlLogix) are asynchronuous controllers, while almost every other controller is synchronuous.

While most PLC's have a cycle consisting of reading inputs, processing the program and switching outputs, this is not the case with CompactLogix and the like. These controllers handle IO independently from program processing. In case of CompactLogix the IO cycle comes every 2ms. So, if your program cycle is much shorter than 2ms, it's quite possible the program processes multiple cycles between 2 consecutive IO scans, hence the output in your example doesn't react every time you throw the switch. But in the odd case the switch is thrown just before the IO is processed, you geta result on the output.

It startled me too the first time I got this effect. I tried to demonstrate the effect of a double coil syndrome. Connect a relay to the output in question and listen to it's clicking.....

The solution? Don't use a continuous task for your main program, but a periodic one with a period of a multiple of 2ms and a priority higher than the IO task (1-6). Find the 'About Tasks' section in the help topics to find out more.

Kind regards,
__________________
Jean Pierre Vandecandelaere
Professional expert industry
VDAB Hoofdbestuur
Gasthuisstraat 31 - 10e verd
B-1000 Brussel
Belgium
  Reply With Quote
Old December 21st, 2004, 02:37 PM   #5
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,463
if your “home” signal is a real-world output, then your “one-shot” arrangement will only keep the output ON for one processor scan ... this is a VERY small slice of time ... it sounds like your field devices (sliders?) might not be seeing the signal for a long enough period to react ...

since we don’t have all of the details of your machinery, the following suggestions are just “general” in nature ...

maybe you could use a timer to keep sending the “home” output for a specified period of time ... (a few seconds?) ... at least long enough for the sliders to see it ...

maybe you could send the “home” output signal continuously UNTIL some sensor in the field confirms that the sliders have reached their home positions ... then turn the signal off ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old December 21st, 2004, 02:45 PM   #6
Allen Nelson
Member
United States

Allen Nelson is offline
 
Join Date: Apr 2002
Location: West Chester, PA
Posts: 1,368
Slow it down.

If I'm understanding you, HOME is a discrete output bit.

If so, then what your ladder logic is doing is energizing that DO for upwards of one PLC scan. That's what, about 10 msec?

You need to remember that ControlLogix (and CompactLogix) don't do the normal Read Inputs-Scan Logic-Write Outputs sequencing. Output modules are updated asychronous to program scan. I'm still learning exactly how often those updates happen, but it's not impossible that you could go through a SET-logic-RESET cycle before the output was updated. Thus, your motion controller input was never activated.

Another possiblity is that, if the output is only on for 10 msec (average), that wasn't enough time to build up a voltage on the wire, to enable the motion control input to read the "activation" voltage.

In short, use something that will produce a longer lasting signal than a one-shot. A Timer TT bit, perhaps.
__________________
©¿©¬
  Reply With Quote
Old December 21st, 2004, 03:16 PM   #7
Clubbe
Member
Canada

Clubbe is offline
 
Join Date: Dec 2004
Location: Guelph, Ontario
Posts: 4
Thanks everyone for your help up to this point... I'm the only fella in my shop who deals with PLC's, so the going can be tough.

At this point I've changed my program to a periodic task with a period of 10ms and a priority of 5. The OSR instruction is still not giving me the output I want, so I believe that a lack of signal is very much the case.

A little clarification: the linear sliders I am using are a product newly introduced by Oriental Motors. Each slider has it's own controller, which I am interfacing to the 1769 a-la-hardwire. Initially I tested the "Home" signal using a simple sustained output from the PLC... I discovered that the slider controllers reacted by repeatedly attempting to home the sliders while a signal was provided. Thus I concluded that a one-shot signal was necessary.

Any thought?... Thanks again everyone!
  Reply With Quote
Old December 21st, 2004, 03:48 PM   #8
Ken Moore
Member
United States

Ken Moore is offline
 
Ken Moore's Avatar
 
Join Date: May 2004
Location: Upstate South Carolina
Posts: 2,349
Try "pulsing" the output for a period of time. Here is how it would look in a SLC. You can try different presets to get the right pulse length. I think you could get rid of the one shot and the done bit also.
Attached Images
File Type: jpg pulseout.jpg (45.0 KB, 159 views)
__________________
"To give real service you must add something that cannot be bought or measured with money; and that is sincerity and integrity."
- Donald A. Adams


Last edited by Ken Moore; December 21st, 2004 at 04:09 PM.
  Reply With Quote
Old December 22nd, 2004, 01:03 AM   #9
Doug_P
Member
United States

Doug_P is offline
 
Join Date: Jun 2003
Posts: 121
Following is the technique used in our ~3000 rungs PLC-3's, in which I/O scan and program scan are asynchronous.

Several of these rungs are spread evenly through the main ladder -

LATCH
----------------------(JSR)



The subroutine called consists of:

LATCH ORF (file-file OR)
---|LBL|-------------+ A: #I0:0 the REAL inputs file
+ B: #B3:0 scratch file
+ B: #B3:0
+ COUNTER: Cxxx
+ LEN: 128
+ MODE: ALL

Cxxx/EN
----------------------(U)--


The final two instructions of the main program are:


MVF (file-file move) Cyyy/EN
----------------------+ A: #B3:0 +-------(U)----
+ R: #I1:0 +
+ COUNTER: yyy +
+ LEN: 128 +
+ MODE: ALL +

MVF Czzz/EN
----------------------+ A: #I0:0 +-------(U)---
+ R: #B3:0
+ COUNTER: zzz
+ LEN: 128
+ MODE: ALL


The subroutine 'latches' the inputs which are on by OR'ing them into the scratch file.

The final two main rungs copy the collected inputs to file I1 and refresh the scratch file to the true current state of the inputs. File I1 is accessed to solve rung logic over the NEXT scan.

Time critical inputs are addressed to I0.

Maybe this will be of some help to you.
  Reply With Quote
Old December 22nd, 2004, 03:36 AM   #10
paraffin power
Member
England

paraffin power is offline
 
paraffin power's Avatar
 
Join Date: Aug 2002
Location: Manchester
Posts: 471
If the axis has a 'moving' output, this is the proper way.


Maybe with a timeout if it doesn't move after a second or so.
pp
  Reply With Quote
Old December 22nd, 2004, 07:17 AM   #11
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 5,307
The easiest way to accomplish what you are doing on Async-scan PLC's, is just to latch the go-home bit with a one shot, and then unlatch it when you get a status bit back that the system has homed.

If you are using motion control modules, or even an external motion system, such a status should be available. You can also use a status bit of 'Home Command Received' if it is available.

This is how the counter modules work in Controllogix for example; You set the output for 'Counter Reset', and leave it set until the module reports bace 'Reset done'.

A nice thing about this approach, is it also provides for some error checking should you wish; start a timer with XIC GoHome and XIO AtHome. If the timer times out, the system isn't homing properly.
  Reply With Quote
Old December 22nd, 2004, 11:15 AM   #12
Clubbe
Member
Canada

Clubbe is offline
 
Join Date: Dec 2004
Location: Guelph, Ontario
Posts: 4
Thumbs up

All sorted out!

Thanks to both Jean Pierre and Ken in particular. I implemented Ken's suggestion and away it went --- problem solved.

Thanks to everyone for your help.

Clubbe
  Reply With Quote
Old December 22nd, 2004, 03:17 PM   #13
93lt1
Member
United States

93lt1 is offline
 
93lt1's Avatar
 
Join Date: Apr 2002
Location: Mount Pleasant, Iowa
Posts: 993
An observation...

In the example Ken used, the XIO T4:0.DN in the timer rung is not necessary because the timer is held in by it's .tt bit. The .tt bit will go off when the .dn bit comes on...

If the timer were using the .en bit to seal in, then the XIO T4:0.DN would be necessary.
Attached Images
File Type: gif pulseout.gif (15.3 KB, 76 views)
  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
CompactLogix DH+ BoxBoy76 LIVE PLC Questions And Answers 13 July 6th, 2011 12:47 PM
DF1 Comm to Compactlogix davidgay LIVE PLC Questions And Answers 3 March 19th, 2004 04:03 PM
Trying to Connect PanelView300 and CompactLogix DF1?!?!?!?!?! DaveMac LIVE PLC Questions And Answers 12 August 12th, 2003 12:42 PM
CompactLogix to PanelView 300 Micro mrhhassan LIVE PLC Questions And Answers 4 July 11th, 2003 11:21 AM
one shot cdmac LIVE PLC Questions And Answers 3 October 15th, 2002 09:02 PM


All times are GMT -5. The time now is 11:41 AM.


.