Sign in to follow this  
Followers 0
darkxp

a1SH and A1SD62E slot card

13 posts in this topic

hi there, can anyone help me to activate this card and put it counting the 1st a b z channels of a shaft encoder (scancon 2rm1000) well connected (worked before, but the plc got a reset...) PLC: a1SH, A1SD62(E) card in slot 3 (from 0) it's for a school project! :) thnx in advance to all

Share this post


Link to post
Share on other sites
I already provided you with link to quick introduction to Mitsubishi: http://forums.mrplc.com/index.php?showtopic=1104 you need to read the manuals and familiar with the I/O concept used by Mitsubishi. first of all, get user manual for your programming software (this will give you more details than link above). then need to get user manual for particular card you want to program - without it, you don't stand a chance of making that card work! in case of special cards, 16 or 32 or whatever number of mapped I/O points are just for handshaking (control) of the the card. actual DATA values are NOT mapped there (this is only done in case of DUMB cards which in real life are just digital input and digital output cards). to get the values to and from any special card (high speed counter, analog input, analog output or whatever) you need to use TO and FROM instructions (if you read the link above, you would have known that by now, we are all willing to help but you also need to put some effort in). those instructions allow access of buffer locations (part of special card memory used for communication and setup). You must read manual for that card to find out what each buffer location does, then you need to pick few importand ones and write PLC program that will use them. Mitsubishi manuals are available from different sources, in North America it's www.meau.com, but there are also European Mitsubishi websites that will do (like http://www.mitsubishi-automation.de/service/ etc.). some manuals and code samples are also in download section of this forum. see if following works for you: http://www.meau.com/functions/dms/getfile....000000187402000 http://www.meau.com/functions/dms/getfile....000000187301000

Share this post


Link to post
Share on other sites
hi there, im using this code, but i still cant get it working, dunno why... so, 2 pages from my code, and 2 from the datasheet... can anyone help me what im doing wrong? i dont get how to put the vars inside the code, cuz the datasheet uses different ladder diagram... thnx for all, and let me know what im doing wrong!

Share this post


Link to post
Share on other sites
you really need to read posts in the link I gave you (there is more than one in that tread). the sooner you do that, the sooner you can start programming. first you need to figure out card addressing: in above example it is obvious that I/O mapped to A2SD62 are in the range 30h..4Fh (this is 32 point). your inputs are before that, and outputs are after... next you remove last digit of this start address (so 30h becomes 3h) and ALL of your TO and FROM instructions will need to use THAT address - as long as they are communicating with this same card. (your second screen shot is using address 30 which is DECIMAL 30, which would not work as correct value is 3). also those 32 I/O points (30h...4Fh) are mentioned in manual as X0..X1F, Y0...Y...1F. It is assumed that user would know that address for this card could be mapped somewhere else (in your case start address is 30h so all addresses would be offset by 30h - in other words that would be X30...X4f, and y30...Y4F for your case). for example X9 is Counter Value Coincidence if you read manual, but in your case, this would be X39, or Y14 is Count Enable signal and in your case, that would be Y44.

Share this post


Link to post
Share on other sites
manuals also have program sample which should work if you correct the addresses. i just didn't like that 32-bit value they copied to D1 (odd address), this is how code could look like (this is not complete program, just an example):

Share this post


Link to post
Share on other sites
hi there... i do undestand ladder (at least with this symbols), and i can get alot things to work. the problem are the slots, and the special card... this is all new to me! so, now i think i got the card running... but i dont get the count values! here is the screen shot from the configurations... can u chenge the instructions in the to, set, dfro, etc... to a symbol ones (like melsec medoc), one of my problems in this is the samples from the datasheets... well, thnx for the help! :) i think we are almost there... i just want to count the value, to use the position to move motor up and down... thnx where can i get a sample code of that?!!? (to read with melsec), is the only program that i have! thnx in advance!

Share this post


Link to post
Share on other sites
...and i just want you to do the right steps and put some effort yourself. that's why i was directing you to that tread and you are still not doing it... i also told you to implement program but you just copied two rungs from sample i posted. YOU need to FINISH the program, and then we can try talking about it... (where is your Y46 etc.? how did you select counter function?) special card is ANY card other than simple digital input or digital output. your first slot is empty, has 16 points mapped, start address is 00h. next slot is input card, start address is 10h, (16 points are X10...X1F). next card is also 16 points, start address 20h (inputs X20...X2F) next one is the special card, 32 points, start address is 30h (inputs are X30...4F, outputs are Y30...Y4F), next one is output card ??? points, start address is Y50..Y?. etc. mentioned start addresses are all bit addresses. when communicating with special card, this is reduced to word level (by omiting last digit or dividing start address by 16 or 10h). this means that if all those cards ware special, their respective head address would be 0h (empty slot), 1h (first input card), 2h (second input card), 3h special card, 5h, output card etc. X or Y only indicates if this is input or output. As you can see special card can have same address for both inputs and outputs (X34 and Y34 for example). These signals are fast and directly interract with the card. you can use them as often as you want, no penalties... but these I/O points are only few bits which is too little to pass significant amount of information. so to communicate with special card, you use TO and FROM instructions. they allow you to read and write to part of card's memory called buffer. each card has different arrangement of buffers. this is why you need manuals. also accessing buffers is slow so it should not be used too often. good practice is to pick set of buffer locations you need, then read and write group of them at once (more efficient than individual access). any special card will require some setup: you write program or use configurators to tell the card what you want it to do (initialize...). if done with program, this will be tipically bunch of rungs starting with First Scan bit. after setup is complete, you may want to start using the card. in most cases this means enabling card and then reading and writing some buffer locations (like read counter value). my version of GX Developer is not IEC so I can't help you much but you should be able to go online with the PLC and monitor buffers. you should be able to see what is going on regardless if card is properly initialized or not. you need to use this to verify if your program suceeded in sending init parameters (your program is writing value 2 to buffer 3 of the card with head address 3h. if this buffer really 2 after that instruction was executed?). you also wrote that this is for school and it was working before. i assume that wiring and all dip switches are set correctly and encoder is wired correctly (but are you sure?). also i was using coil output for y45 but i think you are latching it (without unlatching). just add unlatch in the same rung but after DFROM instruction. toggle that M20 to see updates (you should give a spin to encoder). check the status of all the inputs (X30...) to see if everything is ok (like X3E which turns on when fuse is blown or no power is present). this is first time for me to see special card without error register (buffer) and troubleshooting section is very thin (but this is a very simple card...). you could also try sample program (9.2.1) but adjust the addresses accordingly. this is extremly short code (4-5 rungs), so it should only take few minutes. if this doesn't produce any results, start from begin: - power down plc and pull the card to check jumper/dip switch setting - check if encoder output matches this type of card - check if card and encoder are powered and wired correctly - check if you get pulses at the encoder output (check if LEDs A and B flicker when slowly spinning encoder shaft). - check if pulses you get are really quadrature (extra points, use scope). - read the manual and try again. so... is this enough...?

Share this post


Link to post
Share on other sites
Hi there! :) thnx for the reply... as i said, my main problem isnt the way plcs works, but the way they show info in samples... lol well, now i can get the values from the counters... :) well, now i cant get the settings to reset the counter to zero in the card. and i have tooooo many impulses... like 80.000 per motor revolution... so... how can i get less? division will get me using real numbers.. :( well, tomorrow i will try to get any info at this... and how to reset the values in card memory to match the axis 0...

Share this post


Link to post
Share on other sites
you should be able to use integers (and double integers). check card settings to see if multipliers are on, check encoder resolution to see what it really is. encoders over 4096PPR are not very common. if you get more pulses than setup and encoder is supposed to provide, check wiring, you may be counting noise.

Share this post


Link to post
Share on other sites
hi there... the encoder have 1000ppr :) i get more less accurate now! :) well no multiplier (or by 1), and i get some accurate pulses in up and down counting. well, now i need to get less resolution and a way to control the motor the go near a number os pulses, im figuring out how to do this one... also how can i put the coors in outside the PLC to get the plc doing the job... :) thnx for the amazing help! :)

Share this post


Link to post
Share on other sites
with 1000PPR encoder and x1 multiplier, you must get 1000 pulse per revolution, not 80 000. this probably means improper wiring of the encoder (check if you have proper cable in the first place, then check shields, only ground them in one place etc.). you can also do repeatability test - mark one position of the encoder shaft and current count, then make say turns forward and then back. you should be able to get same reading. if there is problem with noise, ground loops etc. chances are that position would drift.

Share this post


Link to post
Share on other sites
well, thnx, ive done that before... i get 1000 ppr, but, in "true life" i get like 80 000 ppr because of the motor redution, a mecanic system to get 80rev / 1 motor rev. ok, now the problem is to count pulses in terms of cm or mm, i dunno how to do an IF in ladder, or the < or > conditions... something that i want would look like: 1: (start motor) if (pulses > 5000 and pulses < 5500) (stop motor) else goto 1 when i give the instruction to go 1cm ... (i measure 5000 pulses like 1cm) how can i get this? thnx :) i wish i can install ansi C in a PLC! LOL

Share this post


Link to post
Share on other sites
I presume you're using GX IEC Developer based on the examples. I don't have the program infront of me, I do however have GX Developer where I'm at now so it might be slightly deviant from the reality but you'll have to slightly read behind the lines. Just devide the pulses (32 bit) with a DINT (can't mix DINT and INT on the div function) of 500, you will then get pulses in mm. More then, Less then, More then Equal, Less then Equal are called: GT, LT, GE and LE in GX IEC Developer. Can also be done in Structured text where you use "< > >= <=". In GX Developer you will use LD< and LD> aswell as <= >= (I haven't used GX Developer much, I had to lern it on my own when I had to change a machine so there's plenty of holes in my knowlage around that program ;)) Edited by Alexander K

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
Sign in to follow this  
Followers 0