Sign in to follow this  
Followers 0
Gary Burton

fx2n-4da

10 posts in this topic

Hello mitsubishi users! I have to make some changes to a program that references one of these modules. I have not worked with these PLC's at all and having a heck of a time getting my head around the instruction set. What would a write to one of these look like? So far I have read that I would use the TO instruction. what do the other words in the instruction mean?... The existing code looks something like this -|M8002|------------[TO K0 K5 H11 K1] Thanks for any help

Share this post


Link to post
Share on other sites
lookup TO and FROM in a programming manual (available in download section here or at www.meau.com). it goes something like this (read manual, i always get this wrong because i rarely use FX and on newer PLCs there is nicer alternative in form of MOV or BMOV instructions): on a first scan (M8002) send block of data TO a card ('TO' is instruction). TO - send data to some module K0 - module address is zero K5 - register number in the card we are writting to is 5 (K5=decimal 5) H11 - value we are putting into that register is 11h (H11=0x011h=decimal 17) K1 - length of block to be transferred is 1 (K1= decimal 1) what is achived by putting H11 into buffer 5 of that expansion card is in the programming manual for that card. ok, found it, looks like i got it right this time:

Share this post


Link to post
Share on other sites
The TO/FROM (and all commands) are covered in detail in manual JY992D88101. It's in the Downloads section here or at www.meau.com. You will also want to have the manual for the FX2N-4DA to understand the list of buffer memories it uses. That manual part number is JY992D65901. It will have a list of what the buffer memories are each used for.

Share this post


Link to post
Share on other sites
Thank you...what does BFM mean? Edited by Gary Burton

Share this post


Link to post
Share on other sites
Big Friendly Monsters .... or Buffer Memories if you want the correct name. Most FX Family special function modules use Buffer Memories within the modules which are used to communicate with the main PLC. You need to know what these buffer memories are and what they mean for the particular special function module. Please find attached the manual for the FX2N-4DA which will explain it all. Alternatively, you can download the manual at this address http://194.130.244.64/branch/database/serv...amp;portal_id=1 FX2N_4DA.pdf Edited by Colin Carpenter

Share this post


Link to post
Share on other sites
How is the whole module addressed? Like in AB you have slot word bit....here in the TO instruction I have [TO K1 K1 D0 K4] Does this first K1 mean module 1 (first physical module attached to main plc?) Then second K1 means first output referenced? D0 means data in D0 will be written to first output K1 K4 means 4 words of data starting at D0 will be written to channels 1 through 4 (K1-K4)?

Share this post


Link to post
Share on other sites
Thanks - this helped a lot. Question - are the modules allways addressed by their physical position? ie K0 in your example is allways the first module attached to the PLC? Reason I ask is I have several TO instructions referencing KO K1 K2 modules but only one module is attached to the PLC. Iam thinking this is code for a different version of the machine that has 3 expansion modules. All the documentation is in German so not easy to understand whats going on!

Share this post


Link to post
Share on other sites
[TO K1 K1 D0 K4] >>Does this first K1 mean module 1 (first physical module attached to main plc?)<< No, it means the second module attached to the PLC. Special function modules are numbered starting at 0, so there must be something else between the PLC and this module. You don't need to number the modules, the way they are connected on the ribbon cables determines that. So, the above means, write 4 words of data (K4) starting at D0 (therefore, D0, D1, D2, D3) to 4 BFMs starting at BFM 1 (K1) (therefore BFM1,2,3,4) to the second special function module.(K1). If you check the manual, you can see that BFMs 1 - 4 are the addresses for Channels 1-4 respectively.

Share this post


Link to post
Share on other sites
Just to clarify, only Expansion Modules (analog and communications modules) are given "header addresses" (k0, k1, k2, etc.). Extension Blocks (input and output modules) are not counted. So, if you have this kind of arrangement: [CPU][Outputs][FX2N-4DA][inputs][FX2N-4DA] These will be the header addresses: [CPU][none][K0][none][K1]

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