mick1994

Mitsubishi Pointer

4 posts in this topic

Hi. I am new to Mitsubishi PLC. I am doing a project using SFTLP function. However this function set the n1 value to constant and output will be from M0 to Mn1 if N2 = 1. But my n1 is variable and n1 value was set to the highest to get the function block working.   May I know how to set a pointer or a way to call the Mvariable out base on the variable set?

Share this post


Link to post
Share on other sites

details? what CPU model you use? where is your code? you are referring to instruction and we don't even know the family or manual you are referring to.

Share this post


Link to post
Share on other sites

Hi Sir. 

CPU used: FX3S-20MT/ESS

1. I am using DSW instruction to get the BCD value from thumbwheel and convert it to store in D0.

2. There will be an input to SFTLP function and will execute next instruction base on D0 value. 

3. The problem i facing now is I cant read the value store in M(DO value) as the DO value is not a constant. 

Share this post


Link to post
Share on other sites

ok i think i am getting what you are after. 
to do what you want, you need to use so called indexing of the M device, not a pointer. 

so, copy value from D0 to one of V devices such as V0 for example then instead of M(D0), use M0V0

Note that there are two kinds of such index modifiers, V0..Vx and Z0..Zy, depending on CPU
here V is used for decimal devices (and that includes M). 

If your D0 has value 17 and you transfer it to V3
then M200V3 will be M217 because
200 is part of "M200" and
17 is contained in V3 and
200+17=217


 

Indexing.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now