Sign in to follow this  
Followers 0
motioncontroller

Modbus Comm TCP/IP

2 posts in this topic

Hello all, I am interested in knowing if there is anyone that can confirm or prove this wrong: Lack of knowledge I guess with the people I have delt with may have been what has caused me to become lazy and just accept this issue; due to the fact I don't know any better. Config info: CPU374 CMM321 The rest is not worth talking about. I am communicating with a third party controller using Modbus TCP/IP, now my question has to do with exactly the best way to communicate over this protocol. At the moment I Open a channel and leave it open for the whole time the PLC runs, subsequently I have set up a scan counter to deal with specific communication requests that are to arrise every number of scans. So a typical scan senario would be : 1. power up 2. counter counts 10 scans 3. open channnel 4. once scan counter equals 30 scans read third party's status 5. 50 scans write command to third party .........etc Once my counter reaches 110 scans I reset it and start all over minus opening the channel. I have found that by partitioning the COMM_REQ's I have much less of a problem with communication but I would like to speed some of this up, there is a visual lag time from when the PLC receives a digital input to initiate a COMM_REQ and when the third party controller shuts it off and I know this can be due to my scan counter for sure but in order for my COMM_REQ's to get through I must space them out. Questions: 1. Am I limited to 1 channel open to 1 device; if not is there a limit? 2. Should I be opening-reading-closing and/or opening-writing-closing a channel? 3. If I can leave a channel open all the time what is the purpose of the close channel command? 4. Is there a maximum number of COMM_REQ's that can be sent in one scan? 5. Is there a much better way to handle this kind of task? Thank you for your time.

Share this post


Link to post
Share on other sites
I do not have time to answer all questions in detail, but I can help with a couple. 1. Am I limited to 1 channel open to 1 device; if not is there a limit? No, different devices have different number of channels available, check your documentation. 2. Should I be opening-reading-closing and/or opening-writing-closing a channel? Only if you have limited channels, or encounter an error. Are you monitoring the 'Satus Register' for values > 1? See 1. 3. If I can leave a channel open all the time what is the purpose of the close channel command? See 1. and 2. 4. Is there a maximum number of COMM_REQ's that can be sent in one scan? Maybe, but you can do at least 1 per channel and send another as soon as the first's 'Status Register' = 1. 5. Is there a much better way to handle this kind of task? A better way is to monitor the 'Status Register' and send the next COMM_REQ 1 scan after it is = 1. HTH You may also want to locate your designated GE Fanuc AE and consult with him/her. Edited by RussB

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