Sign in to follow this  
Followers 0
joansm

client CP1L-E with a PC in server mode FINS UDP

4 posts in this topic

Hello guys

I am a beginner in FINS UDP communication and I am trying to do a FINS UDP communication between an omron PLC CP1L-E in client mode to communicate with my PC that is in server mode, I am using the SocketTest v3.0.0 program that is in listening mode and still was unable to receive any information from the CLP, can you help me?

The program and some images of the simulation are attached

Thanks for reading

SERVER PC IP ADDRESS 192.168.15.160

CLIENT PLC IP ADDRESS
192.168.15.10

ladder.png

 

sockettest.png

tcp socket (1).cxp

Edited by joansm

Share this post


Link to post
Share on other sites

Posted (edited)

On 28.12.2020 at 9:09 PM, joansm said:

Hello guys

I am a beginner in FINS UDP communication and I am trying to do a FINS UDP communication between an omron PLC CP1L-E in client mode to communicate with my PC that is in server mode, I am using the SocketTest v3.0.0 program that is in listening mode and still was unable to receive any information from the CLP, can you help me?

The program and some images of the simulation are attached

Thanks for reading

SERVER PC IP ADDRESS 192.168.15.160

CLIENT PLC IP ADDRESS
192.168.15.10

ladder.png

 

sockettest.png

tcp socket (1).cxp

I've been looking for a solution to this problem for a long time. How did you solve the problem? 192.168.0.1

Edited by Miller90

Share this post


Link to post
Share on other sites

Old topic but I'll leave the answer.

Some plcs - I recall CP1s are in this category, correct me if wrong - aren't capable of active FINS communication. They can't send out FINS commands but they do reply to FINS requests.

The way to do this with a computer is to flat-out send everything from the computer. You don't actually have to do anything in the PLC for this to work - you just have to send both the read and write commands from the computer. The plc will reply to both, one with the value and the other with a response. Obviously the data needs to be in a fixed memory address.

And the only way to know from the computer when an event happens in this case is to put the reading cycle in its own thread, and send the read commands every 50ms or so (it's called polling). It essentially acts like an HMI. But you have to set some thread locking mechanism in place in case you try to write to the plc at the same time you are reading, since you will be using the same UDP writing function to do both.

If you are not willing to code all of that you better mount a plc that is capable of sending dedicated FINS messages, like a CJ. Then you can split UDP reading and writing. But in my opinion it's worth investing in the polling solution since it works for every controller. I have wrote both kinds of software and I ended up using the polling one for everything. The price difference of mounting a superior model just for that is too high.

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