Sign in to follow this  
Followers 0
panic mode

Using FX2N-4AD

3 posts in this topic

Hi everyone, This is private messaage I got from Steve Cheung. I don't have time to reply except to post this here and suggest som reading material like Mitsubishi manuals, starting point for Mitsubishi programming and of course articles writen by Jim Rowell. Edited by panic mode

Share this post


Link to post
Share on other sites
The first thing you need to do is write a TO instruction that will send the configuration to the analog module. The manual you are really going to need is the FX Programming II manual, part number JY992D88101. This can be readily downloaded from www.meau.com, and will contain all the info you need on the TO and FROM instructions. The second manual will be the one for the FX2N-4AD module, and it's number is JY992D65201 You will probably want to write a TOP (pulsed) instruction so it only happens once. I ususally use the M8000 (always on) or you could just do a TO (not pulsed) and run it from the M8012 first scan flag. Either one makes it only happen once when you power up the PLC or switch the Run/Stop to RUN. If the 4AD is the first special function module, the first parameter in the TO instruction is the K0 to tell it SFM #0. The second parameter is the address in the SFM's buffer memory you want to write to. On the 4AD, the configuration register is 0. So the next parameter is K0. The third parameter is the data you want to write. To set the four channels for 0-10V, you set this data (typically set in hex) to H0000. Since you're only writing one word, the final paramter (number of words to write) is K1. TOP K0 K0 H0000 K1 Now you need to read the inputs into the PLC. That's a FROM statement. I usually tie this to the one second clock pulse. Parameters line up about the same FROM K0 K9 D0 K4 This will read 4 words from buffers 9-12 into D0-D3 in the PLC. You can change the parameters to use another memory area if you like. Now the data coming in will be numeric 0-2000 for 0-10V. Since you want to read 0-40, you should divide the inbound number by 50. DIV D0 K50 D10 This will divide D0 by 50 and place the result in D10 (and D11 will contain a remainder). So you'll want to do this 4 times, one for each input. But remember your destination is two consecutive words, so don't use D11 in the next instruction. If you want a program example or more info, just ask.

Share this post


Link to post
Share on other sites
I would just like to add that if you do online editing, these two combinations are not always the same: If you use first scan contact and TO instruction, TO instruction is NOT executed after online change to the rung. If you use always on bit and TOP instruction, TOP instruction IS executed after online change to the rung. When testing something new the second case might be better solution so you could see the changes immediatelly (unless this interferes with operation of special card or init process in which case you do have to restart PLC).

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