Immediate output M0 file SLC 5/05 allen bradley

feike2

Member
Join Date
Apr 2005
Posts
12
How can I immediate transfer data to a M0 file, I tried to use a IOM instruction but you can only use that for an output. Gr Feike
 
The truth is, you DO immediately transfer data to the M0 file, even without an IOM. The problem you are probably having, is that you have no control over how or when the scanner/module uses the M0/M1-File data.

What are you trying to write immediately?

If it's an output, move it to a local rack output.

If it's a counter reset, start counting in a different manner, OR, use the reset to store the current count value, and use that as an offset-null value and let the counter continue to accumulate.

If this is related to the same problem you were having earlier, it's starting to sound like you need a different solution.
 
@RDRAST
You told me few days ago I maybe could use a 'Gated Count mode'.

So I want to try to toggle the hold bit of the Hi speed counter value, so I have to set bit M0:e.1/2. I want to hold the counter value on the break of a photocell which I programmed in a DII instruction. Is there no possible way to toggle immediate the hold bit on? Otherwise the counter value is to old for purpose.
 
Hrm... if you can't set the hold bit directly, then you might have trouble. Can you just let the counter free run, and use that to drive a soft counter?

By soft counter, I mean take the delta in the main counter value every interrupt scan, and add it to a 'working counter' register?

IF CTR_ENAB (bool) THEN
CTR_DELTA = CTR_CURRENT - CTR_LAST_SCAN
SOFT_CTR = SOFT_CTR + CTR_DELTA
ENDIF
CTR_LAST_SCAN = CTR_CURRENT

Doing something like that, you always have immediate control over what is counted and when.
 
Feike, I've been thinking about your application, and have a rather radical idea for a way to accomplish it. Can you connect the photoeye so that it provides power to the encoder? If the voltages are compatible, and the encoder will immediately send pulses when power is applied, this may give you the most accurate readings. In your PLC, you can copy the accumulator every scan. If the accumulator is non-zero and does not change, that would mean that the photocell is not blocked and the value would be the distance travelled by the last object that passed by. You then can save the value, and reset the accumulator. When the next object passes in front of the eye, the counter will begin counting again. A radical idea, but it may be your best option. Also, it's very important that the spec's of the photocell be checked. You need a very fast switching eye that can supply the current requirements of the encoder/HSCE. I don't think that diddling the "Hold" bit from the SLC is going to be fast enough to improve your results very much. What would be ideal is a hardwired "Hold" input on the HSCE card, but I don't think that's available.
ENCODER.jpg

LOGIC1.jpg
 
Thank you very much for the idea Paul, but my photocell requires 24 V en my encoder 5 V. An other problem is I have to use the encoder also for other purposes, so I cant turn off the power supply. But the idea is very good, I am going to think of a possible solution. Greetz Feike
 
He can't use a relay, as he's already having too much time lag in a 10msec interrupt... no relay's going to handle that.

Solid state switch maybe, but then there are debounce issues to deal with too I'd guess, and again, scanning into the PLC.

If this application is this time critical, I'd probably switch to either a much faster PLC (CLX), or build a dedicated controller, around something like a ZWorld Jackrabbit board to handle whatever function this is.
 
IF I remember correctly, the HSC has local available I/O to use for exactly this type of situation. It would use its internal processor to hadle this and process the inputs directly and then you read the values for the Data Files when it is available. This way, you avoid the dangers of missed counts and varying counts.


This is for an AB HSC, right?

David
 

Similar Topics

Is there an immediate output command in Siemens S7-300 CPU like in A-B? If so, what is the command? Thanks,
Replies
4
Views
2,785
I am trying to speed up a process by using an immediate Output mask command in a program I have running on a SLC500 5/03 Processor. The book I...
Replies
9
Views
3,737
I have written the routine with MAM and MAS stopping the axis when it sees a prox input, then I use the MAH command with axis set to passive and...
Replies
7
Views
2,832
Hi All, I thought that this would be simple. I converted an SLC program which used IIM instructions (Immediate input) to Compact Logix. The...
Replies
8
Views
5,885
System: MP377+ET200S, WinCC Flexible 2008SP1 + Step7 v5.5 I am wondering how can I immediately refresh the ports of the I/O devices without...
Replies
0
Views
1,395
Back
Top Bottom