raheelredben

Issue with mitsubushi melsec PLC modbus QJ71MT91 as server

2 posts in this topic

Hi there guys I am using modbus as server and having the issue that i cant use multiple outputs simultaneously if I want to use coils as outputs I have to put the value of outputs in auto refresh of modbus and if i have to use data registers then i have to use data registers in auto refresh, but simultaneously i cant use both in auto refresh because the auto refresh won,t allow as I am using modbus QJ71MT91. I can see the outputs changing in device buffer that obviously because of the default values of the ladder code but I want to see all of this in modsim32 and want simultaneous outputs coils and holding registers to be seen. 

These are the IP addresses:

plc CPU: 192.168.1.30
modbus:192.168.1.235
pc:192.168.1.240 (I have set the ipv4 settings with ip address that i wrote subnet mask:255.255.255.0 and default gateway: 192.168.1.1)
local network: 192.168.1.1  

I have created a ladder logic for tank filling station that is as follows

Screenshot_41.png.909782881b28f9bf7a2e38

What my ladder code does is that if i turn on input y80 then y100 output that is filling tank turns on and the timer for 100 sec is stored in data register D100 and if input y81 is turned on the output y101 is turned on that is discharging of tank and the timer for 100 sec is stored in D101.

These are the Auto communication parameters I have set for the ladder logic code 

Screenshot_42.thumb.png.9648b5d1616436e5Screenshot_43.png.02b4d501eb17bd656a29aeScreenshot_44.png.af3f0cc5b7e997f7f48d1d

And in order to see the outputs of either coils or data registers working these are the following parameters for auto refresh

For coils

Screenshot_45.png.e577ccceb711a719c01578

 

for registers

Screenshot_46.png.11ddc8148b12fe779da9bf

Can you guys tell me how i can use both simultaneously?? and see the timer value and coil output both at the same time in modsim32? Or in general how can i use multiple outputs at the same time using modbus as server???

 

Share this post


Link to post
Share on other sites

Ok there are two things you can do. The esiest is using the refresh and use D Registers like you have now.

You just write a line of code copying the outputs to a D register

MOV KxY100 D98 where x=1 is 4 bits (or K4Y100 = Y100 to Y10F)

 

Or you can just write code instead of Refresh directly to the BFM

TO   K...(module) K3000 K4Y100 K1

or 

MOV K4Y100 U....\G3000

 

 

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