Idiot_Drake

GX Works2 Q Series TCP issues

8 posts in this topic

Hey guys, been looking around for a solution and I was brought here.  I'm a programmer at a place that just put in a bunch of these Mitsubishi Q series QJ71e71-100 ethernet controllers.  I wrote a TCP server in Java to try and talk to them.  I'm trying to get data sent over from a little GOT1000 test terminal.  The zp.open command is working fine and i'm seeing a good syn-ack handshake, and if i push some text to the plc from the program I get a response (even if it is always the same nonsense).  but when i try to use the zp.send it fails, I get error C1A6 on the ladder program and the q series lights up the comm error light.  I know I'm being super vague here, I was just hoping to gain some insight.  I don't much know what to expect from this forum if you guys are active or if my question even has an answer but i've been banging my head against the wall for days now.  I'm just using a tutorial program from the q series manual and a super basic tcp handler in java.  If there's any other information I can provide let me know.

Share this post


Link to post
Share on other sites

Hey!

C1A6 indicates that you're trying to open an incorrect 'connection number' in the Ethernet card (QJ71E71-100). It should be between 1-16 (ur 1-15 if you are using send/receive paired connection). Could you post some screenshots of your PLC code for easier debugging if the problem persists?

P.S. In section 11.3 in the manual, there's an error code list where all the hex error codes are (like the one you posted). :-)

Share this post


Link to post
Share on other sites

Thanks for the response, this has been quite an issue.

I'll see if I can get some screenshots of the ladder in a little while, the laptop with the sample code on it is out on the floor right now.  I read the error code section, but that didn't really make much sense to me.  I'm not sure how the connection number is set or maintained.  I'll see if I can get you those screenshots, there's really not much going on. It runs through the ZP.OPEN stuff successfully but then when I use the ZP.BUFSND it throws the connection error my code is pretty much just a little mess of the stuff from chapter 5-51 with the close taken out and the bufsnd stuff from 10-10 thrown in.  I know this doesn't really help much more, hopefully i'll have screenshots for you today.

Share this post


Link to post
Share on other sites

Here we got a couple images, the first one shows the working open, the second one shows the bufsnd.  the bufsend is failing with the connection error while the open seems to work perfectly.  M521 is a button click on my machine so I can activate it.

Untitled333.png

Untitled444.png

Share this post


Link to post
Share on other sites

Could you also take a screenshot of the 'Open' settings for the Ethernet card (where you assign IP/Port/Application to the appropriate connections for the Ethernet card (Network Parameter -> Ethernet / CC IE / MELSECNET -> Open Setting).

Are you trying to use the same connection number for both send and receive data?

The Ethernet card needs one connection number per send and/or receive. This essentially means that you need to e.g. use connection number 1 for receiving data, and connection number 2 for sending data. You also need to specify if you are actually sending or receiving data on a given connection number.

Share this post


Link to post
Share on other sites

I set both send and receive on the same port.  I really don't understand this connection number business, I thought it was just an arbitrary number that sent was used as a sort of index so that the ethernet card knew who to send the data too.  eg. set the connection number in the open (K1) and then use it in the bufsnd (K1)

Share this post


Link to post
Share on other sites

alright so your hint about the connection number was what I needed.

I have a  new issue now though, there is a response monitoring timer value on the bufsnd function.  So I set it as low as possible (1 second) and then just let it time out so I can send again but I wish there was a way where I could tell the program the bufsnd was completed normally without giving it a response.  I don't know what it wants me to send to it and the total program freezes until I give it the response.  it won't continue to bufrcv or anything until it has gotten the response or timed out.  IDK 1 second is probably fine but I don't like that comm light being lit up all the time for c022

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