Sign in to follow this  
Followers 0
Duffanator

TCP/IP communication with A-series PLC

11 posts in this topic

Hey all, I was wondering if you could be of some help. I installed a A1SJ71E71 module on a A2SH PLC rack to communicate to a Citec computer. That is working but I also wanted to open up two more ports to get some scale data that I want to collect into the PLC. The scales transmit RS-232, so I got a Comtrol 4-port serial to Ethernet converter that supports socket transmition. Now here's the part that's making me pull my hair out. I wrote the PLC program to open up two ports (2000, and 2500) and I programmed the Comtrol to send any data that it gets out to those two ports. The Comtrol is connecting to the Ethernet card on the PLC because the buffer lights are lighting up, but no matter what I do I can't get any data from the Comtrol to the PLC. I am not getting any recieve buffer errors either. I'm not sure if I'm going about this the right way, I haven't really done any Ethernet programming before, it looks correct to me but I can't be sure. Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites
Each connection has different buffers for receiving data and sending data. Maybe you are reading from incorrect buffer memory locations. If you are not reading from buffer memory at all, you should read with FROM instruction when data arrives.

Share this post


Link to post
Share on other sites
Yes, I am using a "From" instruction. I have two ports open for a Citec system communication and they are buffers 1 and 2. I am using buffers 3 and 4 for the scale data. The problem is that I'm never getting the received complete signal for buffer 3 or 4 to come on, I have the received complete signal initiating the from command so it's never getting any data from the ethernet card. I'm not sure why I can't get the complete signal.

Share this post


Link to post
Share on other sites
You should have two connections for each scale, first connection for receiving and the second connection for sending. You should open two connections "Paired". I had programmed a similar program. First connection open settings : H281, second connection open settings: H200. But in my program connections were 'active'. Hope this helps

Share this post


Link to post
Share on other sites
Do you need two ports if you just want to recieve data? The manual seems to indicate that you can have just one open connection if you want to recieve from a port. I haven't tried to have two ports per scale yet, I will have to try that.

Share this post


Link to post
Share on other sites
Just to receive data one connection is enough. If the scale sends data continuously this would work. The buffers you are reading from may be wrong. You can monitor buffers and input signals of the card in the Gx Developers Buffer Memory Batch monitor screen. The program in the picture reads data received in the 2. connection.

Share this post


Link to post
Share on other sites
I think, we must be sure that Comtrol is sending data through ethernet. Try to program comtrol to send data to your PC, ou can try to use HyperTerminal for listening and displaying TCP/IP data. For UDP protocol, there are lots of free software on the net.

Share this post


Link to post
Share on other sites
I got it! I hooked the Comtrol up to my laptop and was able to recieve the data from it with Hyperterminal. At that point I rewrote the program to use a pair of connections with the H281 settings that funfrok had given me. After I did that it still would not work so I looked a little closer and found that you can program the remote node's IP adress and port # to return to. I programmed that in and set the Comtrol to send to port 2000 and listen to port 2001. After that it worked! Then I got curious and wondered if that was the problem the whole time, so I went back to my original program and tried it with the original settings that I had (H8001 for port settings) and programed in the Comtrols IP adress and listening port number. I tried it and it didn't work, so I changed the settings to Active, not paired (H201) and BAM, it started working! So I could still use 1 port per scale and didn't need paired ports. Thank you guys for the help and giving me things to check. It is much appreciated!

Share this post


Link to post
Share on other sites
Dear all, Now i have problem with ethernet, I use wonderware intouch ver 10 and I/O server Takebishi, ethernet module A1SJ71E71-B2-S3 of Mitshubishi.But now i don't know how to transfer signal from PC to PLC.Can you help me.I can receiver signal from PLC

Share this post


Link to post
Share on other sites
"Robot lords of Tokyo, Smile, Taste Kittens" Regards, Doug Keller Electronics and Controls Tech. Hatfield Quality Meats Am I missing something here? A purveyor of quality meats asking if you can taste... Well, fluffy little independant creatures that purr at any sign of affection!

Share this post


Link to post
Share on other sites
Didn't you ever know what was in your hot dogs?

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