Mitsubishi Q series...analog output configuration. What's going on here?

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
This is for a Q68DAIN 8-channel analog output.
Most of the channels are outputting 0-20mA but a couple are outputting 10vDC
Anyone know what rung 780 is doing?

Screenshot_20201216_122359.jpg
 
Last edited:
The TO instruction is the same as using the U\G move function so
[TO H0C H0 H0 K1] moves Hex 0 to Card 13 (OC) at buffer memory 0 for one register so it is setting Buffer memory 0 (#BFM0) to all 0 to enable all channels just like it does on the analogue input cards (remember you had to enable a channel on one of the analogue inputs). Somewhere there will be another either "TO" or Ux\Gx move to buffer memory #BFM 20 & 21 so it could be either
[TO H0C H20 Hxxx K2]
Or MOV U0C\G20 Hxxx ]
and MOV U0C\G21 Hxxx]
To set the channels to the required modes i.e. 0-10, 4-20, 0-20 etc.
 
Parky, thanks for this. The reason I was asking is that I am using a spare (unused) channel on the module and was wondering if I had to change the hex value H0C to something else to account for enabling the previously spare channel (final, 8th channel). Here's the code that comes after it...

Edit....I think I need to add an extra leg to rung 831 for channel 8 (H8)?

IMG_20201216_141609.jpg
 
Last edited:
No that value H0C is the card address I believe and it is moving H0 to all channels to enable them so they are all enabled.
The code you have just posted is the transfer of your values to send to the analogue output it looks like here only channels 1, 2, 4,5,6,7 have data being sent to them so it looks like channels 3 & 8 do not have any values sent to them, well at least not in this bit of code but that does not mean that it is not being transferred in another rung, if your drawings show them as un-populated then they are probably spare If I was you I would check that the channels 3 & 8 are not being written to elsewhere.
You state that some channels are configured as different types i.e. 0-10v or 0-20ma, in that case, I would expect somewhere the nibble patterns i.e. a hex value sent to buffer memories 20 & 21 the nibble patterns are 4 bits so each 4 nibbles will have 0,1,2,3,4 corresponding to 0= 4-20ma, 1 = 0-20ma 2 = 1-5V 3 = 0-5V 4 = -10 to +10v, 5 is what they call user config mode but I don't think you need worry about that.
An example would be [TO H0C H14, H0123 k1] this would set the first four channels to ch1 as 4-20, ch2 to 0-20, ch3 to 0-5V and the oter 4 channels could be set as required.
You really need to know what these channels are set to so I assume there must be more code somewhere to set the channels up, if not this suggests these are all set to 4-20ma (default).
 
Correction: The outputs are ALL 0-20mA (as configured on GX developer).
Channel 8 (or ch07 when indexed from zero) is definitely free, because when I open the flap-door on the module, there's no wires connected to terminals 15/16. That's a shame because the person that did the PLC upgrade normally connected all the wires to the terminal blocks (including the spares) for future use.
 
Last edited:
Ok then you don't need to do any config if you are going to use 0-20ma all you need to do is add another line in 831 where you do a TO instruction with the address of your 0-4000 value so
[TO H0C H8 Dxxx K1]
 
Don't know how you are going to control your pump but this is an old app I did some years ago that controlled a steam valve via a PI loop and also for controlling a pump for supply of 0-30 Cm3/hr, the analogue input is converted to a floating point variable, the next bit of code controlled the PI and output it to an Analogue output. I have modified it to possibly suit your needs, I suggest if you use it you put an engineering screen on the HMI and populate it with certain parameters that would need to be changed during commissioning for example:
Set point limits of your expected range 0.0 - 100.0 (this will be a floatl value but probably on the engineers page)
Proportional component (this would be a float with limits of 0.1 to 10.0 to 1 decimal place)
Integral component a float range 0.1 to 5.0
Note there are two files, Main, this is the code for the control & main1, this is just a test for simulation so you don't need it but if you want to run it on a simulator you could Note you need to set the P&I constants before running the code or it will not work.
I suggest a P of 2.5 & an I of 0.5 to start with, this should give pretty good control.
 
For some reason it did not add the variable descriptions you can use this just replace the D memories to ones you will use.
This looks a bit daunting for a beginner so not sure you will use it.
 
Don't know how you are going to control your pump but this is an old app I did some years ago that controlled a steam valve via a PI loop and also for controlling a pump for supply of 0-30 Cm3/hr, the analogue input is converted to a floating point variable, the next bit of code controlled the PI and output it to an Analogue output. I have modified it to possibly suit your needs, I suggest if you use it you put an engineering screen on the HMI and populate it with certain parameters that would need to be changed during commissioning for example:
Set point limits of your expected range 0.0 - 100.0 (this will be a floatl value but probably on the engineers page)
Proportional component (this would be a float with limits of 0.1 to 10.0 to 1 decimal place)
Integral component a float range 0.1 to 5.0
Note there are two files, Main, this is the code for the control & main1, this is just a test for simulation so you don't need it but if you want to run it on a simulator you could Note you need to set the P&I constants before running the code or it will not work.
I suggest a P of 2.5 & an I of 0.5 to start with, this should give pretty good control.

Wow, many thanks! I'll download these files tomorrow and take a closer look.
 
One thing to remember is the ramp up/down times of the inverter, I suggest somewhere about 5 seconds in the inverter parameters but it will depend on the pump.
The timer used to sample & update the PI control setting is also important to slow or to fast and you will not be able to control the loop it will almost certainly hunt I suggest between 0.4 & 1.0 seconds.
The PI & Set point variables ideally should be accessible on the HMI that way you can tune the loop with ease, these need to be retentive i.e. do not reset to 0 on power down of the PLC. Also remember that the float values use two registers even though they are shown as one i.e. D220 in the program actually use D220 & D221.
Here is an example of a setting page but have not put in any level entry passwords to stop un-authorised access to settings

PI Setting Display.png
 

Attachments

  • PI Setting page.zip
    23.1 KB · Views: 4

Similar Topics

In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
293
I am working with Fx2N-2DA and Fx0N-3A card ? what is the ladder logic for this two card ?
Replies
1
Views
1,985
Hello. I've been learning about PLC's in a few months now, mainly PLC programming, and yesterday I got an assignment to read an analog laser...
Replies
3
Views
4,620
Hello friends; I am new with Mitsubishi system. I need some example to handle the 4-20mA by using FX-2n-4AD which is attached with FX-1N-14M...
Replies
5
Views
3,569
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
56
Back
Top Bottom