Colin Carpenter Posted April 13, 2006 Report Posted April 13, 2006 I can never seem to work out if it's OK or not to do this, for example: LD X0 PLS M0 LD M0 INCP D0 I seem to get strange (unpredictable) results if I use a pulsed memory address to operate another instruction with "P" appended to it. Obviously it's easy to get round ..... LD X0 PLS M0 LD M0 INC D0 works fine, as does LD X0 INCP D0 Anyone know what the "official" line on using one pulse to drive another is? No real reason why I would want to do it, but can't really think of a reason why it shouldn't be done. Just curious ..... Quote
Sergei Troizky Posted April 14, 2006 Report Posted April 14, 2006 (edited) Hi, Colin Based on over 10 years experience with Mitsubishi FX series, I can assure you that all three versions of code will do the same and with no problems. The first one just contains a redundancy. The second one was the syntax for FX0S (if I recall correctly), which did not support pulse format of instructions. It is also simpler for further interplatform migration. The last one is the most compact representation. Edited April 14, 2006 by Sergei Troizky Quote
Crossbow Posted April 14, 2006 Report Posted April 14, 2006 Gotta agree with Sergei... all work the same... Quote
Colin Carpenter Posted April 15, 2006 Author Report Posted April 15, 2006 Thanks, I guess it must just be me. It's always been one of those things that lurk in my far distant memory from when I was starting to programme PLCs and didn't REALLY understand all the bits and bobs. "Never pulse a pulse" - just seems like one of those "old wive's tales" that are based on something factual but aren't neccessarily true all the time. It's still one of the things I'll look for and change if I'm trying to find a bug in the programme, even though, I have to agree with you and say that there is no logical reason why it shouldn't work Old habits die hard .... just like old superstitions. Quote
Goody Posted April 15, 2006 Report Posted April 15, 2006 Yeah hehehe. A lot of things are 'suck n see' with Mitsi's A lot of quirks/features are undocumented that are perculiar to mitsubishi programming. Like you can 'pulse' a coil but by mistake put the bit of that coil on a line before that coil and sometimes it works - sometimes not. Of course I wouldnt do it that way - but it can happen Quote
Colin Carpenter Posted April 15, 2006 Author Report Posted April 15, 2006 >>Like you can 'pulse' a coil but by mistake put the bit of that coil on a line before that coil and sometimes it works - sometimes not.<< Interesting .... could you write a bit of instruction code to show me exactly what you mean? Maybe this is the clue to the inconsistencies that I seem to get. Quote
Sergei Troizky Posted April 16, 2006 Report Posted April 16, 2006 The destination bit of the PLS/PLF instruction is On one full scan, since the instruction is scanned with true condition and until this rung is scanned again in the next scan. This bit cannot be a destination of any other instruction in the program. You can use it as a contact before or after this rung. If it works wrong, it must be another reason. Quote
tmu Posted April 16, 2006 Report Posted April 16, 2006 One malfunction is caused if you use PLS/PLFs in sub-program or inside interrupt programs. That is why I only use PLS/PLF in main programs. Quote
Goody Posted April 16, 2006 Report Posted April 16, 2006 This is what I meant - although it is supposed to work on one full scan - it sometimes doesnt. I have no example because I always alter the code (or dont do it at all) This is without jumps or subroutines. Quote
Recommended Posts
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.