Sign in to follow this  
Followers 0
justwhy2003

QJ71MB91 Modbus

28 posts in this topic

Hi I have reacently installed 2 x Q02UCPU PLCs on 2 identical pumping stations. They have been running since installation last month. 1 station is pumping to the other and a radio link is now to be set up to allow for some parameters from either station to be sent to each other, sump levels, pressure etc and most importantly an inhibit signal from the 2nd station to tell the 1st station to stop pumping when there is a high level. I have 2 x QJ71MB91 modbus cards to add to each PLC to allow communications via the radio link and am planning to go to site next week to install. I have only just started working with Modbus this week and am trying to gather as much info as possible before my visit. I have the following questions: 1 - What is the basic set up? Do I need to change the configuration of each PLC, 1 to be a master and 1 a slave,or is this configuration setup in the Modbus cards? Is this even needed? 2 - If say I have 10 variables from each PLC to transmit to the other, do i attach PLC 1 variables to say 40000 to 400009 and PLC 2 to 400010 to 400019 to avoid conflict and then reallocate these to available registers in the receiving PLCs? 3 - Im using GX developer, will this allow me to make any changes I need to? Sorry if this is a bit basic but I thought better to ask now rather than when im on site. Thanks Justin

Share this post


Link to post
Share on other sites
1. Yes, you need to set up one of the Modbus cards as master, and the other card as slave 2. Correct 3. You must install GX Configurator MB to configure the modules

Share this post


Link to post
Share on other sites
If to use CC-Link it will be more cheaper and easy to set up.

Share this post


Link to post
Share on other sites
Thanks I have to work with what is already on site. Should GX Config MB be included in my GX Developer or do I need to purchase it seperately? From reading seperate posts, Im getting mixed messages about wether this is included in later versions of GX Dev (Im using 8.89T) or not? Also as I understand, the Modbus cards can be configured using only GX Dev but the process is made alot simpler using GX Config MB. Is this correct? Justin

Share this post


Link to post
Share on other sites
GX Configurator MB should be included in your GX Developer license. If you have a CD it should be included there under "Utilities" (if I remember it correct). Yes, it's much easier to set up the cards if you use GX Configurator MB. You can do it with PLC programming, but then you'll have to set up and configure the cards using PLC code which is a bit of work. However with GX Configurator MB you can simply configure the cards via a windows GUI. I would recommend to install GX Configurator MB!!

Share this post


Link to post
Share on other sites
Thanks, think ive found it. Is it opened through GX in the same way as the Simulator or is it a seperate program? The reason I ask is that im not sure if it is installed already, is there any way I can check even if I dont have the Modbus card beside me at the minute? Justin

Share this post


Link to post
Share on other sites
I don't remember if GX Developer has the same menu as GX IEC Developer, but I think you have to: 1. Add an intelligent module under PLC Parameter -> IO assignment 2. Go to "Module Configuration", select the correct module and press "Configure Module" You should then be able to select the correct module As mentioned I don't remember if the menu's are the same, but the above works for GX IEC Dev.

Share this post


Link to post
Share on other sites
Tools, Intelligent Module Utility, Start

Share this post


Link to post
Share on other sites
OK Think Im making progress here. Im following the flow diagram in Chapter 7 of the Config MB manual from the GX Developer CD. Although it is a little difficult as I cannot try things out as I go along because the PLC is on site 200 miles away. Im also getting a funny feeling that setting the communications up is a lot simpler than Im digging myself into in the manual. Does anyone have an example of how to set up 1 master and 1 slave to send a number of D register values from/to each using GX Config MB? Justin

Share this post


Link to post
Share on other sites
I have gotten a lend of 2 Q series PLCs and took the modbus cards and radio modules back from site to configure at my desk. Just to make sure of something while Im setting up... The radio module is an Elpro wireless gate way (105U-G_MD1). The 485 terminal connections are A and B, that the manual says are positive and negative accordingly. The manual for the QJ71MB91 calls its connections SDA SDB RDA and RDB. as Im using 2 wire communications,I short out the As and Bs and Im pretty sure i connect these to the As and Bs on the Elpro with terminating resistors etc. My query is that I dont see +ve or -ve mentioned in the QJ71MB91 manual when talking about terminals where the Elpro states that the polarity must be correct on the 485. Is there any relation between RDA/SDA, RDB/SDB and +ve,-ve? I just dont want to blow anything up before I start...

Share this post


Link to post
Share on other sites
RS485 is always a bit difficult since there's no 'standard' when naming the connections (as you've discovered with your devices). There should be no problem in "testing" different cabling, so you can try to see if one polarity works. If it don't work you have to reverse it.... Just don't connect any power supply to the bus cable....

Share this post


Link to post
Share on other sites
Just a quick one. What is the start IO number? is it the slot on the PLC, does it depend on what type of cards are inserted to the left of the QJ71MB91 card?

Share this post


Link to post
Share on other sites
Yes, the IO number and the head address both depend on what modules are placed between the CPU and the specific module you wish to get the address for. So if you have the MB91 directly to the right of the CPU, it will have the starting address h00. If you have an ethernet card between, the MB91 will have the start address h20.... You can also freely assign the starting addresses in the IO setup under PLC Parameter. You can choose freely which addresses you want to assign to each card, but I would recommend to stick with the default values (which are automaticly assigned if you don't write anything there). Head address is simply the start IO address except for the last number (IO h00 = HeadAddr 0, IO h20 = HeadAddr 2, IO h50 = HeadAddr 5)

Share this post


Link to post
Share on other sites
Ok Ive made communications, the RX/TX lights on my Elpro unit and the SD/RD on my QJ71MB91 card are flashing. In the Configurator MB software I used the Device assignment feature to allocate registers D4001 to address 40001 and the following 25 registers. In the Elpro unit I can only allocate 40001 - 49999 to output registers so I have configured the unit to read from 40001 and the following 10 registers. I keep getting the error code 7383 "The modbus assignment parameters have not been set for the modbus device specified in the received request message. The modbus device assignment parameter setting is in progress" I switched off and on the Elpro and also increased the polling time t 1000mS incase the Modbus card didnt have enough time to set up so Im pretty sure this is an addressing problem. Is there something obvious here that Im missing? perhaps the offset from the modbus holding register head device number...? Bit stuck

Share this post


Link to post
Share on other sites
Further to this, the address range in the PLC for modbus devices seems to be 000001 to at least 465536. This is out side of what I can access on the adress ranges available for polling in the Elpro unit (0 - 49999)..?

Share this post


Link to post
Share on other sites
A ScreenShot of the Switch Settings (PLC Parameter->IO Settings->Switch Settings) would be helpful

Share this post


Link to post
Share on other sites
Ok firstly, Im pretty sure I have made communications between 1 wireless module and the PLC. In the Config MB device assignment: I allocated D2000 to Input register headder address 0 (which should correspond to 300001) and the following 10 registers. I allocated D2010 to holding register address 0 (which should correspond to 400001) and the following 10 registers. These are pretty much the only settings I have made in the Config MB. My switch settings had been sent already and the unit power cycled with the following settings: switch1 switch2 switch3 switch4 switch5 0001 0545 0001 0544 0201 This has set up my channel 2 (485) as follows: 8 data bits no parity bit even parity 1 stop bit RTU mode Online update enabled (to allow holding registers to be written to?) Address 2 The wireless Elpro unit has been set up to read from registers 30001 and write to registers 40001 onwards. The screenshot below shows the read settings. I have then downloaded the same program to the 2nd PLC and the same configuration to the Modbus card via Config MB. I just saved the same program used under a different name and used that. Also configured wireless unit 2 for similar operation I am receiving the error 7383. But do not understand why the same configuration would not work for both PLCs. I have tried using the 2nd wireless gateway on the 1st PLC and vice versa but am still getting the error on PLC 2 leading me to think it is the configuration of PLC 2 that is causing the error. I was thinking that it might be because both Modbus cards have the same address but surely they are on 2 seperate systems with 2 seperate Modbus masters..? Cant think of what to try next. Can I clear the entire PLC and modbus card config to make sure that Im starting rom scratch..? Any help appreciated. Justin

Share this post


Link to post
Share on other sites
Seems as though the 1st PLC is now showing the same error. Another theory is that the modbus addresses available in the PLC are outside the range available to the Elpro. Holding registers are 400001 onwards and input registers are 300001 onwards in the PLC but the Elpro unit holding registers are 40001 - 49999 and input registers 30001 - 39999. Dost this seem likely?

Share this post


Link to post
Share on other sites
Think Im making progress. I configured the switches so that the default Modbus addresses are used instead of assigning my own (BTW what is the advantage of assigning?) I then told my Elpro master 1 to extract information from a coil in the PLC 1. I could do this since the coil registers allocated to the Elpro (1-9999) overlap with the coil allocations in the PLC (008193-016384). This is then sent to Elpro master unit 2 and written to the same register in PLC 2 and used to switch an output. Which it does when switched in PLC 1. I believe this means 2 things, 1 that I have made communications between the PLCs, and 2 that the Modbus address in the PLC dont look like they will match up with the addresses available in the Elpro for register values. Has anyone ever come across this? Is it just a hardware mis-match? Further to this, although the comms seem to be working fine, I am still receiving an error on my modbus cards (730A) due to the fact that I have configured for default parameters but still seem to have user assignments available in the initial settings in Config MB. The Corrective action in the manual is to delete the QJ71MB91 parameters entered to the programmable controller CPU. I have tried deleted this in Config MB and even tried writing to the PLC after this and power cycling but the error remains and when I read from the PLC in Config MB, the initial settings are still shown as available. How can I make this delete stick? Justin

Share this post


Link to post
Share on other sites
To remove all the settings you'll have to format the memory (in GX Developer I think it's located under "Online->Format" or something).... You'll have to do a format to delete the parameter-config file in the PLC.....

Share this post


Link to post
Share on other sites
For future reference, Online > Delete PLC Data and selected 'Intelligent function module'. Seemed to do the trick.

Share this post


Link to post
Share on other sites
Hmmm, though I had everything working yesterday evening. Have now got 2 PLCs each with a Elpro gateway. Each gateway configured a s a master and the PLC as the slave. Information being extracted from each and sent to a 3 gateway that will probably be configured as a slave to facilitate an existing SCADA system. Could see changes at the receiving Gateway that were being madde at the sending PLCs. Today the units run for a while then a different error occurs on each. Station 1 Modbus card error 7411 (CRC/LRC error pg 345 in users manual) From what I can see, this is to do with the layout of the message sent between master/slave. Station 2 Modbus card error 7400 (framing error pg 344 in users manual) Says to check the stop bit and all transmission setting match, which they do. Also only use 1 master in the system and adjust the transmission timing to prevent simultaneous data transmission. I am only using 1 master per PLC so that shouldnt be a problem. right? I can increase the polling delay between messages on my master. Could it be fro both of these errors that there isnt enough time being allowed for the information to be sent fully to the master? Justin

Share this post


Link to post
Share on other sites
How have you connected the systems?? All the systems together in a bus, or separated systems?? Do you have multiple masters on the same bus-wire?? A simple paint drawing or something would be helpful....

Share this post


Link to post
Share on other sites
They are 2 seperate modbus connections. The system seems to be doing what it should. The changes at the PLC is being shown at the receiving gateway. I just dont want these errors/warnings to come back and bite while on site. The error lights stayed off on both units for at least 2 hours on my past attempt but for some reason just come on. Im not sure what has happened tha wasnt happening before. Just had a thought over lunch. I have configured the switch settings to enable online changes. Would the modbus card be expecting to receive information that at the present is not being sent? Update, tried disabling online change but the error 7400 still occurs. Justin Edited by justwhy2003

Share this post


Link to post
Share on other sites
Have my test system working pretty well. Failry confident that the 7400 fault is due to noise. Im not using shielded cables on my desk, I connected the antennas to the wireless gateways to improve the connectivity and the error occured quicker on the modbus card. So now I have digital signals transmited. I have been talking to my distributor and he is 100% that I should be able to access holding registers starting from address 40001, the only addressing I can see in the manual for holding registers is starting at 400001. Has anyone had any problems/experience with this in the past? am I missing something silly when addressing for holding registers? Justin

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