Hello,
I am looking for some confirmation and starting a thread on this project I will be taking on.
Connecting Arduino to a linear actuator driver from CKD.
PN: ECG-BNNN30-END05
Reading through the user manual for the Ethernet IP enabled model, I can see that they are expecting a 63byte data to operate the actuator/driver.
In the arduino, would creating a array of 63bytes, and passing it through using Serial.write(array,63);
Would that pass all 63bytes at once? How will the driver know when to stop looking for data or if there is more data to be read? I'm assuming it will just be a super long string of 0's and 1's concatenated?
To command a specific position for the actuator to go to, I only need to adjust bytes 8-11 of this array, if I send just those bytes, would the driver have any idea what to do with it? or do I need to send all 63bytes every time I want to update a command?
When you use Serial.write(), the 63 bytes will be placed in a buffer and will be transferred in the background.
That depends on how the driver works. E.g. the driver might have a timeout mechanism; in which case it will expect successive bytes to arrive within e.g. 500 milliseconds of each other.
You might get better help if you post the instruction manual so people can see how it works.
Note
Be careful with the word "string"; in the programming world it usually indicates text which is not necessarily the case.
It depend on driver protocol. Sending 63 bytes when you only need 3 seems like overkill. But I think in any case you can't just send a bytes 8-11 to control a position. The driver needs some additional commands to know what these bytes mean.
Perhaps the driver has another, shorter byte sequence to control the position only, look at the manual.
Hello, in your ladder diagram, the program is only filling the needed values to the correct position in your data array, that later, in another part of the program will be sent to the actuator.
On the other way, you are talking about serial communication, but in the original post talks about ethernet IP, this can be done throug websokets.
I think it will be neccesary to send the full packet althoug only some bytes change, is the "industrial style"
Hello,
Posting the user manual here. I've read through the entire thing, but just trying to wrap my head around what the actual serial data should look like. ECG Series(EtherNet_IP)(1MB).pdf (1.0 MB)
I will have the physical model to test with here in a couple of days, so I hope to have a good grasp, and if any industry standard or common communication methods exist for this sort of connection.
If the output of PLC is just a 63byte packet, and Arduino can do that, then I am happy.
I believe the Ethernet IP configuration is just the connection type. In the manual they give the pin-outs of the ethernet port and it is just Td Rd grounds commons.
I had a quick question. The Ethernet port calls out TD+,TD-,RD+,RD-.
This doesn't have anything to do with TCP does it?
Am I correct in thinking that stripping the wires from the ethernet cable, and treating them as Tx and Rx wires would work the same way as serial communication over RS232? and that there's no need for me to get a ethernet port adapter?
RS-232 to me means serial communciation, using serial.write() to transfer data.
Does ethernetIP require a different library and hardwarepins? Does it require MOSI and MISO pins?
Everything is different. You appear to be in over your head on this.
That looks like 100BASE-TX. Most Arduino board processors don't have a native Ethernet port (I think Teensy 4.0 and 4.1 may), so you'll need an external Ethernet-to-something (likely SPI) interface adaptor board and the software to run it.
Today most people relate ethernet to some WIFI network, but the reality is ethernet has always been a wired direct connection between devices. It was originally designed for coaxial cable connection between two computers.
Then it was modified to use twisted pair wires and the CAT-5 type cabling was developed. If you can find an ethernet interface board and a PC that can accept it, then you might have a chance, but no Ardiuno.
Yes, looks like it will do what you want. BUT the associated libraries only mention it supports either client or server connections, but not point-to-point between two devices. You will have to research the libraries and see if you can find a way for it to work for your project.
Online information about @kota_ozawa1's driver is sparce and the manufacturer's web page is poor. But, it does appear that the device needs to get it's IP Address from DHCP:
The easiest way to do that is by connecting it to a router. In fact, I think I'd do that first (before buying any Arduino hardware) and then try to ping it from a PC on the subnet.
If that works, the Arduino can also connect to the subnet via the router and won't need to support point-to-point.
But, IMO, there's insufficient information to proceed. Will communication between the devices be as peer clients? Client / Server? UDP? TCP? No way to tell with out a real protocol document for the driver.
looking at the CKD Corporation web site, the history of product development for machines using this actuator appear to start in the 1980's. So the technology seems to have been anchored in what was current at that time. All their component offerings are part of their current complete machine offerings. Which make sense for the company. Just plug and play to replace a failed component.
My understanding of the manual is as follows:
There is a EDS file(Configuration file) that needs to be installed in the master unit(Arduino) to configure network settings(I'm assuming IP address)
There is a windows application called "S-Tools" that is used to configure parameters, switch between operating modes, switch between communication modes, set IP address, and a whole bunch of other stuff.
I am to set the IP address I want to access within S-Tools.
Does this mean this driver is expected to be used in point-point applications?
I'm confused because the manual doesn't mention anything about TCP/UDP. Don't these protocols require a handshake of some sort? But I don't see any information about a handshake in the manual, just bytes and definition of bits.