Sign in to follow this  
Followers 0
Moravuscz

Help with SEND & RECV with CP1H-X /w CIF41 & CJ2H-CPU64EIP ?

4 posts in this topic

Posted (edited)

Hello everyone.

I need help setting up a data transfer between a CP1H with a CIF41 module, and a CJ2H.
I realize this can't be done with Ethernet/IP, so I figure FINS should do the trick. I've read up a bit on the SEND and RECV instructions, and tried to set up a RECV in the CJ2H (since I know the CIF41 can't act as the sender, it can only receive), but I just can't seem to get it to work...

I work at a factory and we're setting up a data collection system. It is mostly CJ2s with EIP tags doing most of the transters, but there are a few machines where EIP tags can't be utilised.
Unfortunately I don't really have the freedom of choice what to work with, my budget is already pretty dry, so I kinda have to work with what I have...

We need to read 100 WORDs from the CP1H to the CJ2H and send 10 WORDs from the CJ2H to the CP1H, so I figure I'll need to make both SEND and RECV in the CJ2H.

CJ2H-CPU64EIP
Has two EIP units, built-in and an EIP21. Acts as a relay device to the internal production line network. All the machines on the line network send data via EIP tags to this relay machine.

  • The internal network:
    • Built-in EIP (CPU Unit 0)
    • IP: 10.1.95.80/24
    • FINS Net 95
    • FINS Node 80
  • External network:
    • CJ1W-EIP21 (Unit 2)
    • FINS Node 9
    • FINS Net 2
    • IP 10.1.99.9/16

CP1H-X

  • CP1W-CIF41 in the left slot.
    • IP: 10.1.95.180/24
    • FINS Net 95
    • FINS Node 180

They are on the same subnet within the line network and the same FINS Network as well. I have successfully set up routing tables and can connect from the external network via the added EIP21 card on the CJ2H to the CP1H PLC and work on it in CX-Programmer and other tools. That should mean the communication works, and I'm just failing to configure the RECV parameter properly...

Here's what I have right now:
I've pretty much followed the example in the W465 manual from page 235 in combination with the Instruction Help for RECV.
(Instructions horizontally are intentional for the purpose of saving vertical space for this screenshot, I normally have them vertically. Also sorry for basically no symbol comments...)
Clipboard01.thumb.png.b286b8b2f891a5925b

In the CP1H in D0 I've input FFFF.
I run this by setting on W511.15 and hope that FFFF will appear in E3_3800, but no such luck.
A202.00 does blink indicating the logical port did get used and the instruction executed, but didn't work as needed.
I'm not sure about the response code.

Here's how I understand the control words:
D7700 being #0064 means 100 WORDs transmitted.
D7701 being #005F means that the FINS Network of the PLC I read from (CP1H) is 95
D7702 being #B4E4 means that the FINS Node of the PLC I read from (CP1H) is 180, and the Unit address on that PLC is the Serial Communications Board Port 1 (I think this thing is what I'm getting wrong, I just can't figure out what to put here... I've tried 00 for the Unit address and that transferred from D0 on the CJ2H which isn't what I wanted, I've also tried #10 to specify a CPU Bus Unit 0, as well as FE to specify "Unit connected to network (not necessary to specify Unit)", but none of these worked)
D7703 being #000F means no response needed, use logical port 0, and retry 15 times
D7704 being #0 means default timeout

Can someone please tell me what I'm doing wrong?

Edited by Moravuscz

Share this post


Link to post
Share on other sites

MOV #B400 D7702

You are trying to communicate with the CPU, so the least significant byte of C+2 (D7702) needs to be 00.

 

1 person likes this

Share this post


Link to post
Share on other sites

Ooooh, yeah, I see. It works.
I get it now. I thought it was a bit weird there was no specification for the Option Board Slots (0xFC and 0xFD), and it's because they're treated as the CPU Unit...
It was a stupid misunderstanding after all and I wasn't that far off...

I've gone ahead and did similarly for the SEND and that works too.

Thank you very much Michael.

Share this post


Link to post
Share on other sites

You were very close!  Thanks for posting that it worked.

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