FINS Communication with C++

3 posts in this topic

Hi, I'm having a little trouble connecting to a PLC from my program. I thought my previous post a few months ago fixed it, but apparently it did not do much. Here is my code:


And here is the resulting reply from the PLC after converting it to hexadecimal


So far, I've narrowed it down to the issue that my program is sending 64 instead of the 18 that was specified by the FINS command. I assume that the received error is due to the fact that the PLC did not receive the correct instructions from my program. The "End" is not sent by the PLC, it is a personal note for me to know where the received message ends.

My goal is to simply receive signals from D00 to D68. I imagine that the received string should be in the form of:

00 C0 00 02 01 01 00 01 00 00 01 01 [Response Code] [Data]

Can someone help point out where I can start looking for why my program is sending 64 instead of 18? I do think I am messing up something simple here, but I'm not sure where to start.

EDIT: To clarify the models, I am connecting over Ethernet to an Omron CP1L-M40EDT with CP1W-CIF41

Thank you in advance!

Edited by dangegatterhill
Added Omron Model Number

Share this post

Link to post
Share on other sites

Do you have a routing table in the PLC?

What is the IP Address of the PLC?  Of the PC? 

Do you have a FINS Node number set for the CIF41 (Browser setup)?  if so, what is it?


Share this post

Link to post
Share on other sites

The data byte order is Big endian in CP1L. You must swap by 16 bits words for a PC.

1 person likes this

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