Andrei Blagaila

WAND Function

13 posts in this topic

In the project I'm working on, I came across something I don't really understand in this form. The line is as follows.

SM400 - [WAND H0FF D9686]

I know how the command works (ANDs the 16 bits from two word memories) but in this sintax i don't understand where it puts its results and why does it get used with a Hexadecimal constant?

Has anybody come across this before?

Thank you

Share this post


Link to post
Share on other sites

Hello Andrei,

The result is back into D9686. And basically It just filtering out the last 8 bits.

Hex is just easier to read as each F means 1111 in binary.

so 0000.0000.1111.1111 is used in conjunction with the value of D9686. So only the first 8 bits of this register can be a logical 1.

For example;

D9686 = 0101.1110.0101.1111

H00FF = 0000.0000.1111.1111

only 1 + 1 = 1 
Result = 0000.0000.0101.1111

Hope this is clear

Share this post


Link to post
Share on other sites

Yes it is. So basically it overwrites D9686 with 0000 0000 0101 1111 for your example right? it filters only the first 8 bits because H00FF being 0000 0000 1111 1111 the 0 cannot turn into 1.

By chance do you have experience also with GT Designer with GOT1000? I'm having a masive headache with that as well.

Share this post


Link to post
Share on other sites

Exactly !!!!

What would you like to know. ???

p.s. There ares some e-learning on www.mitsubishielectric.com/fa

 

 

Share this post


Link to post
Share on other sites

So I started working for a new company that uses Mitsubishi. I have no experience in GX Works2 and GT Designer 3. The project is already done. Both PLC and HMI. The problem is that some of the menus in the HMI are password protected. I cannot find in the project (because I don't have the hardware and I am simulating it) where you set the password protection on the pages. It has some variables in the PLC that are related. Cam you explain (if it is allowed) how you set a password for a page? IF it's not allowed don't worry about it :)

Share this post


Link to post
Share on other sites

Do you have your System tree open? If not View => docking window System Tree.

Now in the system tree go to GOT setting => environmental Settings => security

There are two ways this screen security  can be setup LEVEL or OPERATOR. Which one is being used???

Share this post


Link to post
Share on other sites

Can I just switch it to None and simulate it like that? We have an urgent issue at a client and I cannot go through the HMI to find a command.

Share this post


Link to post
Share on other sites

Hmm possibly that will work.

If is does not change it to Level and add a free Dataregister in the PLC. You can than change the security level via that PLC register

Share this post


Link to post
Share on other sites

Level and password  are the same. You will need to fill in de register at the top

Share this post


Link to post
Share on other sites

So I understood how to load a value in a double word. Now I want to to a WAND between this and a Hex value and write the result into another double word. How do I do that? 

For example I load the value k68000 intro D0 and D1 usind DMOV K68000 D0. How do I write correctly (it keeps telling me the value i want to WAND exceeds the limit)?

WAND H7FFFFF D0 and write it into D2 D3?

Thank you

Share this post


Link to post
Share on other sites

Never mind. After searching a bit longer I found the DAND instruction. Thank you nevertheless.

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