Mitsubishi Q series Data Compare...Help

MitsM83

Member
Join Date
Jan 2017
Location
Indianapolis
Posts
90
Okay so,

I have a user data base that consists of 100 users that have 10 words of data each. So 1000 words.

My log in data is coming in as BIN ASCII into 3 words. It is gathered from a ID badge reader at my HMI not that that matters.

When a person scans the badge I need to check the 1000 word data base for a match to the 3 word card data. Then grab the 10 word user info and hold it in the logged in user area of my code.

I can think of a few ways to do this but want short and efficient code.

Off the top of my head I am thinking use some BKCMP= and indirect addressing but that is going to need a lot of registers and internal relays.

Any one have any cool commands for comparing one data register to 1000 then showing where the match is??

Just started to think this over I will come up with something, would be nice if someone has all ready done the work for me!!
 
[FONT=&quot]Well no one instruction comes to mind. However I do something very similar on an Fx3U but using numbers as the password.

FOR X := 0 TO 399 DO
IF LoginEnteredPassword = Users[X].Password THEN
LoginLevel_Int := Users[X].Level;
BMOV_M(TRUE,Users[X].Name[0],K20,CurrentUserName[0]);
END_IF;
END_FOR;[/FONT]
 
Nice thanks for the input. I couldn't find any one command either. What I ended up doing is dirty but its working. I will probably change it ten times and end up with something cleaner... I cant type it in Structured Text lol but here is the skinny. It is for lack of a better term scanning the 1000 word area for a match then using the match location to get the rest of the 10 word log in data.

IF good scan-- [MOVP scan data D0]
IF good scan-- [/]M0 -- [INC Z1]
IF good scan-- [= D0 R0Z1]-- [MOVP Z1 D1] and [SET M0]

BMOV R0Z1 D10 K10
Then just use D1 value to go get the rest of the user data.
There is quite a bit more to it than that to keep it accurate and stop the INC of Z1 but that gets you an idea.
 

Similar Topics

Hi, Can someone help me by explaining how I can transfer data from one PLC to another. I'm using GX Works 2, both CPU's are the same (Q03UDVCPU)...
Replies
6
Views
2,370
Is there any way to make a connection directly between a GE Fanuc 90-30 and a Mitsubishi FX Series PLC? If there is no means to connect directly...
Replies
21
Views
4,208
This is a general question, so I'm just looking for help/advice or maybe where I should look to find this out... I've created a new page on the...
Replies
2
Views
1,015
hi, i am using Mitsubishi Plc Q series, we have 2 separate system both also using Q series plc, Each system also have QJ71E71-100 communication...
Replies
1
Views
2,599
Hi everyone, I have a problem which I need to read the Data Register (DM) of a Mitsubishi PLC (Q and A Series) via UDP. I need to make a code in...
Replies
1
Views
3,523
Back
Top Bottom