dragosel80 Posted January 17, 2006 Report Posted January 17, 2006 Hello, Please look at the following sequence: counter_m(M8000, CS251, 10); IF X4 THEN CN251:=D200; END_IF; what can I do to correct the instruction "CN251:=D200" , because at compilation I receive the following information "type mismatch". Thank You. Quote
roger10 Posted January 17, 2006 Report Posted January 17, 2006 hi, what type of hardware and programming software you use? I don't have a compilation error. CPU Type: Q06H or Q25PRH GX IEC Developer 7.01 Quote
dragosel80 Posted January 17, 2006 Author Report Posted January 17, 2006 I use a FX1N PLC on GX IEC Developer 6.00 can you give me a link from where I can download GX IEC Developer 7.01? Thank you. Quote
roger10 Posted January 17, 2006 Report Posted January 17, 2006 there is no link. you have to buy a licence. call your local mitsubishi partner. But you don't need GID 7.01. The D200 is an INT or WORD (16bit) register you have to specify a DINT or DWORD (32bit) register. specify D200 as a variable name. Quote
Crossbow Posted January 18, 2006 Report Posted January 18, 2006 High speed counter values are double numbers (32 bits). You need to set up the reference to D200 to be a double word. That's your type mismatch. You're trying to move a 32-bit number to a 16-bit register. As Roger10 said, define a name for D200 and make it a double (32-bit) number and you're all set. Quote
wizard Posted April 15, 2007 Report Posted April 15, 2007 (edited) I have the same problem. If someone could describe exactly how to do this. roger10 said: "The D200 is an INT or WORD (16bit) register you have to specify a DINT or DWORD (32bit) register. specify D200 as a variable name." But I have no clue how to do this in GX IEC Developer 7.00 using Structured Text. I've tryed: dmov_m(x4, CN251, D0); but I get the error "Type mismatch at parameter 3 of dmov_m". In ladder the dmov instruction works perfect without any modifications. Please help. Edited April 15, 2007 by wizard Quote
Crossbow Posted April 16, 2007 Report Posted April 16, 2007 Create a variable name, assign it to address D200, and make it a 32-bit data type. Quote
wizard Posted April 16, 2007 Report Posted April 16, 2007 (edited) it is very simple to create a variable name and make it DINT. but how to assign it to D200? what are the steps?\ you'll find capture here of the header: http://img254.imageshack.us/my.php?image=g...eveloperkh1.jpg Edited April 16, 2007 by wizard Quote
Colin Carpenter Posted April 16, 2007 Report Posted April 16, 2007 Do you know the difference between Global Variables and Local Variables? Your screen shot is of the header of your POU, and the variables shown are "Local Variables". To assign a Mitsubishi address to a variable, it has to be done in the Global Variables section. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.