Thor Hammer Posted September 23, 2019 Report Posted September 23, 2019 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. Quote
Michael Walsh Posted September 24, 2019 Report Posted September 24, 2019 What are you trying to communicate with on the PC side? SCADA, VB program, some other custom program type? Quote
Thor Hammer Posted September 24, 2019 Author Report Posted September 24, 2019 (edited) I'll have to ask the client. However, it is just a computer running windows with their custom software. Edited September 24, 2019 by Thor Hammer Quote
Thor Hammer Posted September 24, 2019 Author Report Posted September 24, 2019 This is the document with the communications protocol the client has provided to us. QORVO Chemical Mixer - Protocol - ASCII Command - v2.docx Quote
Michael Walsh Posted September 25, 2019 Report Posted September 25, 2019 You are going to have to use something called Socket Services. Where are you located? Quote
Thor Hammer Posted October 1, 2019 Author Report Posted October 1, 2019 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. Quote
Thor Hammer Posted October 8, 2019 Author Report Posted October 8, 2019 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? Quote
Thor Hammer Posted October 9, 2019 Author Report Posted October 9, 2019 I figured it out. Just wanted to update this thread. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.