Mitsubishi instruction to Rslogix equivalent

Romix

Member
Join Date
Nov 2020
Location
Maryland
Posts
2
Hi, I have always worked with Rslogix500 and I'm working on a project migrating the code from an old mitsubishi FX64MR to and slc505.
I'm having trouble finding equivalent for the following instruction:
----||----[ROL D3 K1] (The open contact is a bit M98)
Out of the manual, this instruction is rotating left one bit at a time (K1) the number stored at D3 (16 bits number, which changes all the time). Every time M98 receives a pulse the number is shifted to the left.
The only instruction that comes to mind on Rslogix is BSL (bit shift left) as its very similar to what they do; the problem is that if I use it, it would look like this:
File: N7:55 (this can be integer or a word for ex. B3:0)
Control: R6:0
Bit address: (I dont know what to put here as I would usually set the bit that will be writing the high states into the BSL instruction) But the mitsubishi instruction does not "record" from a bit, it just shifts one bit at a time every time M98 makes a pulse.
Length: 16 (bits)
Is there another instruction more suitable for this?
Thank you in advance for your time
 
Hi, I have always worked with Rslogix500 and I'm working on a project migrating the code from an old mitsubishi FX64MR to and slc505.
I'm having trouble finding equivalent for the following instruction:
----||----[ROL D3 K1] (The open contact is a bit M98)
Out of the manual, this instruction is rotating left one bit at a time (K1) the number stored at D3 (16 bits number, which changes all the time). Every time M98 receives a pulse the number is shifted to the left.
The only instruction that comes to mind on Rslogix is BSL (bit shift left) as its very similar to what they do; the problem is that if I use it, it would look like this:
File: N7:55 (this can be integer or a word for ex. B3:0)
Control: R6:0
Bit address: (I dont know what to put here as I would usually set the bit that will be writing the high states into the BSL instruction) But the mitsubishi instruction does not "record" from a bit, it just shifts one bit at a time every time M98 makes a pulse.
Length: 16 (bits)
Is there another instruction more suitable for this?
Thank you in advance for your time




when the mitsi does the [ROL], I think it "ROLls" bit 15 to bit 0 of D3.


See here, page App-26:


xxx.png




So so I think N7:55/15 would be the [Bit address] of the BSL control, or maybe even N7:55/16 = N7:56:0 and make the length be 17, or it's also possible that control.UL might work instead, depending on when the BSL retrieves the bit.


For sanity's sake and to remove all ambiguity, it's reasonable to duplicate N7:55/15 to another location unaffected by that BSL, before executing that BSL.
 
Update:


From the BSL instruction description here (SLC 500 Instruction Set):
For wraparound operation, set the position of the bit address to the last bit of the array or to the UL bit, whichever applies.
What the dickens does "whichever applies" mean?


Heh, I wonder which it is? I can test on a MicroLogix 1100.
 
Last edited:
Heh, it can be either.


Believe it or not, I already had some BSL test code in my 1100.

Counter values being greater than 16 verify (more or less) that the single 1 bit has wrapped around in both methods.



N7:55/0


bsl_test_n7_55_0.png




R6:0.UL


bsl_test_r6_0_ul.png
 
Thank you for even taking the time to test it and making sure it does the trick. I can't thank you enough. Now I can finally keep going with this, I had been breaking my head with this for hours. (y)
 
Thank you for even taking the time to test it and making sure it does the trick. I can't thank you enough. Now I can finally keep going with this, I had been breaking my head with this for hours. (y)


Glad to help, but note that I used a MicroLogix 1100 and the freebie RSLogix Micro Starter Lite, not a SLC5/05 and RSLogix 500, so YMMV and you should test first.
 

Similar Topics

Is K4M101 a constant? Is K7 a constant? What does this instruction do? Thanks
Replies
19
Views
5,063
Hi, Can anyone tell me if there is an equivalent 'truncate' function in Mitsubishi GX Works 2. Ive worked with Rockwell and Siemens for years...
Replies
23
Views
4,558
Good morning or afternoon wherever you may be. New to Mitsubishi controls and playing around with software and the simulator. GX Works 2...
Replies
6
Views
2,809
Hi everybody, I am working on a packaging machine that communicates with 2 servo drives and need a little help understanding the instruction. I...
Replies
2
Views
2,148
Hello, Guys and galls I have a problem in my Mitsubishi FX3U PLC, it was showing a flashing red light, the problem occurred by itself as far as I...
Replies
10
Views
3,336
Back
Top Bottom