PDA

View Full Version : Mitsubishi FX0 PLC Driver


znelbok
04-30-2010, 05:41 PM
So I have finally gotten around to learning CML and out of that is the first CML driver I have written. Its not the prettiest thing by any means but appears to be working.

This is a driver for the range of Mitsibishi FX0 PLC's and includes the following:
FX0-14
FX0S-10
FX0S-14
FX0S-16
FX0S-20
FX0S-24
FX0S-30

I have had to use Citect to reverse engineer the protocol, which was a time consuming job sending one command out at a time and recording the results and then developing the protocol.

I have a FX0-14, so I have not been able to test the others but it should work as only the number of inputs and outputs change between models.

Fields
AuxRelays - 512 (Auxillary relays for use in ladder logic)
Counters - 16
Dataregisters - 32 (there can be a mix of 16bit and 32 bit data registers - see below)
DisableOutputs - 1 (to stop the PLC writing to any of its outputs)
Inputs - Variable, based on model selected
Offline - Puts the driver off line so you can configure the PLC with the appropriate software.
Outputs - Variable, based on model selected
ReloadConfig - to reload the dataregister configuration
staterelays - 64 (similar to Axillary relays)
Timers - 56
Timerstate - 56 (boolean field to indicate a timer is active or not).

I don't expect that anyone will have one, but just in case they do the driver is here. You can find them on ebay as well.

Data Registers
When you use 32bit data registers, it takes up two 16 bit data registers. Thus if you have data register 16 as a 32 bit register, data register 17 is not available.
To accommodate this I have a config file (FX0-Config.csv) that is a list of all 32bit data registers that the driver needs. It will then not create the 16bit data registers as required

eg
If the file contains one value only of 16, then fields DataReg_D16 & DataReg_D17 will not be created, and a field DataReg32_D16 is created.

The file is a CSV file that needs to be in
C:\Program Files\CQC\CQCData\MacroFileRoot\Drivers\Mitusbishi PLC

An example file is also attached. Remove the .txt from the end of the file name.

Have fun

Mick

zaccari
05-01-2010, 12:54 PM
Can you describe this device or point to more information? I even googled it and I'm still completely in the dark. I don't know if I want to convince IVB to buy one so he'll sell it to me cheap later. :-)

Russ...

znelbok
05-01-2010, 01:08 PM
These PLC's are a few years old now. They are used in industry for automation control.

http://www.howman.com/mitsu2.html

programming manual
http://www.dcc.ttu.ee/Automaatika/LAP/LAP5760/JY992D48301-J_FX.pdf

Page 12 has the interface cable details (its RS422 so you will need a RS422 - RS232 adapter which is cheap)
http://www.dcc.ttu.ee/Automaatika/LAP/LAP5760/JY992D48301-J_FX.pdf

ebay search results - should work with all of these
http://shop.ebay.com/i.html?_nkw=mitsubishi+fx0&_armrs=1&_from=&_ipg=

zaccari
05-03-2010, 08:44 AM
How are you using them and which variety are you using?

Russ...

znelbok
05-03-2010, 04:11 PM
I have a FX0-14

I have
- a solenoid valve for the water to the horse trough
- the electric fence monitor DO wired to an input.
- a DO able to turn the fence monitor off
- the domestic power meter wh pulse
- the doemstic end of interval pulse
- the Off Peak power meter wh pulse
- the solar power meter wh pulse

The PLC counts the pulses and tallies the wh between intervals (15 mins). These are stored in a data register. I also keep the total power meter reading. I use this to calculate the current electricity bill total.

The water valve is opened automatically every morning to fill the water trough for the horses. There is also a manual button on the shed to fill as well. A timer in the PLC dictates the length of time that it is open for. This is configurable through CQC.

The fence monitor watches the electric fence voltage and outputs this via serial (a seperate CQC driver). The discrete output from it into the PLC allows me to trigger an alert based on a boolean instead of an integer (which cost me $35 in SMS on one occasion because the value kept changing and triggering the SMS event)

Mick