Mitsubishi TO and From Commands

iansmiler

Member
Join Date
Oct 2004
Location
North America - For Now....
Posts
58
Hi all, I am having trouble communicating between my Qseries PLC and a Q64DA anolog card. I am using GX Developer and would really apprecite somebody Mailing me a sample bit of code that will enable the unit and allow me to ramp up and down an inverter. I have looked at the example in the Mitsi manual but it is some what confusing! hope you can help?

Ian
 
to use the TO instruction on the analog output you must set the channel enables first, if my memory serves me right the channel enables are 0 not 1 so
note use first pass flag for init Mxx
|Mxx|----------------[TO S, N1, N2, N3]
a sample is [TO K0,K2,K0,K1]
this is S = enable bits (K0) for all channels
N1 = card address (Kxx)
N2 = mode (K0) = enable DA
N3 = Number of words K1
then you have to set the Y outputs for the Channels
use always on flag
|Mxxx|----------------(Y1) or Y whatever the address is for card
etc.
then send the values to the module, you can do this a number of ways one at a time or as a block
|mxxx|---------[TO D100 Kxx K1 K1]
to send all channels
[TO D100 Kxx K1 K8]
this sends D100 to D107 to channels 1 to 8
then all you do is vary the values in d100 to d107
This is all from memory so there could be a few errors there are many more functions like setting gains etc, you can read the X inputs to read the status of the card or set the Y outputs to set gain etc.
hope this helps
 
don't need to use FROM and TO, you can use MOV and BMOV...




sm400
---| |------------[BMOV u0\g10 d100 k5] (copy 5 buffers to plc memeory)

(if conversion is complete, copy raw value to final register)

D100.0
---| |------------[MOV D101 D121] (channel 1)
D100.1
---| |------------[MOV D102 D122] (channel 2)
D100.2
---| |------------[MOV D103 D123] (channel 3)
D100.3
---| |------------[MOV D104 D124] (channel 4)

 
you also might want to change default settings of the card
but you may leave it and just use code above. code assumes that this card if first in a rack or has base address 0.
if your card address starts at say 1C0, just remove last digit (0)
and put the remaining part of address (1C) instead of 0 in first rung (change "BMOV u0\G10..." to "BMOV u1C\G10...").


--------- edit -----------

one of these days i'll have to start reading posts more carefully :)
sorry for misunderstanding, code above is for input card Q64AD not for Q64DA. use info provided by parky. just don't forget that for output card you need to enable each channel (if I recall you need to do it in two places...)
 
Last edited:
If you don't like to type program, you can use DA-utility program, which is included in GX-dev-CD folder utility package. Install that and use TOols=>Intelligent function utility.
Tmu
 
If you use D-A configurator (comes on the GX Configurator disk) you don't need to use TO and FROM, the software does it all for you. I think it costs about £200 here in the UK. Off hand I don't know if this works with all mitsi PLCs or just Q.
 
Well Panic, he wants to send data to the DA not read it as AD, but yes you can use Uo\g10, this is in the manual the same for ASI module but in the ASI manual with it being a translation from japanese the chars are wrong, it took me some time to figure it out.

There are a lot more functions like setting the zero/span filters etc.
 
Manual for Q64DA is here http://www.meau.com/functions/dms/getfile.asp?ID=010000000000000001000000214704000
To program this card you need to know it's base address.
To enable outputs you will have to turn on Y1, Y2, Y3, Y4 on (see 3.3.1).
Manual assumes that ths is 0, you have to offset it if required.
If your card has base address 1C0 for example, than instead of Y1-Y4 you will have to use Y1C1-Y1C4.
Buffer memory is listed in 3.4.2. Buffer 0 has enable/disable bits for each channel.
According to manual default value is Fh which makes all four channel enabled (see 3.4.5).
If this is not the case, you can enable it using instruction [MOV h00F U1C\G0] (still assuming base address 1C0, hence
"U1C" which means address and "\G0" which is buffer 0. "U" and "\G" are always there.)
to write value to output, you will have to use buffer locations 1-4 (or 1-8 if you had 8ch analog card).
if your value is in D100, you can send it to first output by [MOV D100 U1C\G1]
to send value is in D101, to second output use [MOV D101 U1C\G2] etc. (just read 3.4.5 and 3.4.6)
to read any error codes (buffer 19dec or 13h) you could use [MOV U1C\G19 D50] to transfer the code to plc address D50. Error codes are listed in chapter 8 (troubleshooting).
i think you get the point and using any other buffer memory location should be piece of cake...
 
you will know if card is in error if X0 is off or XF is on. to reset error, you have to turn on YF.
again if your base address is off you will have to offset it so for example above that would be Y1CF.
(X0 or X1C0 would tell you if the module is ready and XF or X1CF if there is error). (see I/O list 3.3.1)

Note: mentioned address h1C0 was just an assumption. you need to know configuration of your PLC (check parameter settings)
 

Similar Topics

Hi all, I have to send AT Commands to GSM Modem from my Mitsubishi Q Series PLC. I have two Intelligent Modules of QJ71C24-R2 with Q02UCPU. How...
Replies
6
Views
2,332
I'm looking to get some spare keys for this PLC. Does anyone know a source or have a part number? My searches are turning up nothing at the moment.
Replies
1
Views
52
I'm struggling to get an FR-E800SCE to work on CC-Link IE TSN. I'm sure the issue is with the drive, when I plug in the network cable I get no...
Replies
1
Views
85
Hi , Where i can find Mitsubishi PLC Card end of line & replacement model details. i am looking for Q02CPU replacement model. Please advice. thanks
Replies
2
Views
117
Hi guys, Im trying to set the real time clock in my Mitsubishi FX1N, but it shows this error ES: 01800001 I have good communication with...
Replies
3
Views
138
Back
Top Bottom