Sign in to follow this  
Followers 0
Thor Hammer

ETN21-TCP Comm Questions-Need an Integrator

8 posts in this topic

Gents,

I'm up against a wall and reaching out to find a system integrator that can assist us in writing some code for our PLC program.

CJ2M-CPU11 communicating with an NS8. The ETN21 is supposed to receive and send info in ASCII to a computer. We have never setup this type of connection. The project is due in two days and I am out of time to figure it out on my own. I wanted to know if there is anyone that we can hire to write this code for us. I've read through all the manuals on TCP connections, sockets, and the like. I have more questions than answers at this point. The logic in the program is written. I just need the ASCII code and communications written.

I understand that the ascii will come in and go out as HEX. What I don't understand is in the instruction manual W421 section 6-7 page 129 there is a programming example to open a socket in TCP. Do I just copy and paste this code? Where do I put the SEND RECV commands? Where do I put my multiple DM addresses (BSET) to write the ascii words (hex) to be sent? Its all very confusing for me. Desperately need help. I could figure it out over time through experimentation. However my boss has stated I am out of time and this unit ships in two days time.

Any help or suggestions on whom can assist in writing the code that's adept at this type of thing is greatly appreciated.

Share this post


Link to post
Share on other sites

What are you trying to communicate with on the PC side?  SCADA, VB program, some other custom program type?

Share this post


Link to post
Share on other sites

I'll have to ask the client. However, it is just a computer running windows with their custom software.

 

Edited by Thor Hammer

Share this post


Link to post
Share on other sites

You are going to have to use something called Socket Services.  Where are you located?  

Share this post


Link to post
Share on other sites

Michael we are located in San Jose California.

I've been on site doing startup and testing on the system for the past week. Our customer is fortunately in the same city. 

They declined downloading Kepware to their PC in the wafer tool. Bummer.

So I am now having to write the necessary strings in STL in CX Programmer. I've been reading the manuals and planned to use FB's for the opening and closing of the socket. This is all new to me and now I have to be done by this Sunday. Sure.

Share this post


Link to post
Share on other sites

I have a question. If the PC sends me a command in ASCII such as:

#AB,ALIVE,LR

When received into the buffer it will be in HEX correct? I can then parse the data to extract the word ALIVE and IF it equals ALIVE then I can trigger an output in my FB to send a response back that says ALIVE. Is that right? Or do I need to convert it then parse it?

Share this post


Link to post
Share on other sites

I figured it out. Just wanted to update this thread.

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