Making a network in the factory

Thread Starter

Spek

Joined Feb 6, 2009
20
Not sure if this is the right spot on this forum, but

I like to connect lots of (pharmaceutical) machines/terminals/regulator PLC's/measure devices onto 1 or 2 networks. To get an overview of the factory, remote access/control, stuff like that. There are about 60 nodes right now, and that probably will grow further. Not all of them will send data continously though. It's on demand, or when something bad happens (error message).

Unfortunately, each machine is different. Some only have RS-232 interface options, others may support Ethernet or CAN, and they certainly do not share the same protocol. So, I was thinking about making a custom "converter" module for each machine. This piece of hardware will:
1- Take input from the machine, whatever is available (RS232, ISP, ...)
2- Convert the data to our own uniform protocol
3- Put it on the bus line

Now I have 2 questions:
- What kind of network would suit us? I have some exerpience with CANbus, but there is also CAN open, Omnibus, Ethernet...
- Does someone know "ready-to-use" programmable boards with either CAN/Ethernet output (depends on the first question) and a second port such as RS-232 or ISP? I like Arduino, but they don't come with CAN as far as I know. Maybe something like this:
http://www.ecrater.com/product.php?pid=6765416

Or even better, protected boxes, as they operate in dusty environments. Programming these modules is not a problem, but we don't want to solder all the chips and boxes together ourselves.

Regards,
Rick
 

AlexR

Joined Jan 16, 2008
732
Talk to one of the networking hardware suppliers, Cisco is one that I have had dealings with but there are others as well. I'm sure they will be able to supply an off the shelf solution that will be quicker, probably cheaper and definitely more maintainable than any roll-your-own solution.
 

Thread Starter

Spek

Joined Feb 6, 2009
20
That is one option, but I'd rather learn it myself, and I won't get any salary if others do it :) I like a challenge, it's my job. No serious, most of the software and machines PLC's were already developed in-house by me, so I know exactly what the people here want and how all individual subsystems could cooperate and fit in our workflow. I did this stuff before but on a smaller scale, and with less varying machines.

I doubt if third parties are always cheaper. We have a couple of software ERP and CAD packages that require maintenance once in a while. The licenses and costs for a couple of guys that visit us a few days per year are ten times my salary. And when you need them, it always takes time before they can visit, and as they don't know the company details it takes time to explain what you exactly want. I know, fooling around years on a not-properly-working project is expensive as well. But that's the challenge, making something good.


I'm convinced we can achieve what we want, but I don't want to make stupid descissions. For example, making a CAN network to find out later Ethernet was a better choice.
 
Last edited:

Thread Starter

Spek

Joined Feb 6, 2009
20
Thanks! And they have a contact point in the Netherlands, not unimportant.

I had a quick look. Something like this could help us:
http://www.icpdas.com/products/Remote_IO/can_bus/i-7530.htm

If I understand it right, these modules are programmable. What kind of software do they provide for that? Since each module could give totally different output, I need to collect, convert and put the values in the proper CAN messages. That's not too difficult, at least if the programming tools are somewhat flexible.
 

AlexR

Joined Jan 16, 2008
732
...............
I'm convinced we can achieve what we want, but I don't want to make stupid descissions. For example, making a CAN network to find out later Ethernet was a better choice.
That's why you should be talking to network professionals. They know about all the latest hardware and the relative strengths and weaknesses of various network options.
Also don't imagine that they will roll in a complete network and leave you out of the loop. What probably would happen is that they would recommend a network topography and the hardware needed (routers, terminal servers, protocol translators etc) and then leave it up to you to interconnect and configure the network. After all as you say you know a lot more about the machines that have to be connected than they do.
It probably will cost more than if you do it yourself but it will end up a maintainable network with easily obtainable spares and good documentation and the ability to expand the network several years down the track if needs be.
 

Thread Starter

Spek

Joined Feb 6, 2009
20
You are certainly right, but still I like to figure out as much as possible myself. For fun, to learn, and to keep independant from others. It's a pretty big project, but not a nuclear powerplant either so there is some space to play. If it turns out to be too complex or large, we can still contact a Cisco, IBM or someone else. I was just wondering about what kind of network people here would advice, and if someone is familiar with programmable CAN / RS-232 / Ethernet / ... / converters.
 

retched

Joined Dec 5, 2009
5,207
Well there are limitations to all of the protocols. For instance, you will have speed limitations, and distance limitations with all. Ethernet will most likely come out on top because of the amount of products already made to accept multitudes of data and transmit it over long cables at high speeds with minimal error. Not the case with CAN and RS-232.
You would need various repeaters every 20 feet or so with RS-232, that would require you to implement these all over the building. Ethernet also gives you the ability to convert to and from wireless without a fuss.
 

BMorse

Joined Sep 26, 2009
2,675
Well there are limitations to all of the protocols. For instance, you will have speed limitations, and distance limitations with all. Ethernet will most likely come out on top because of the amount of products already made to accept multitudes of data and transmit it over long cables at high speeds with minimal error.

Not the case with CAN and RS-232.
You would need various repeaters every 20 feet or so with RS-232, that would require you to implement these all over the building. Ethernet also gives you the ability to convert to and from wireless without a fuss.

Not the case for RS232:
Cable length is one of the most discussed items in RS232 world. The standard has a clear answer, the maximum cable length is 50 feet, or the cable length equal to a capacitance of 2500 pF. The latter rule is often forgotten. This means that using a cable with low capacitance allows you to span longer distances without going beyond the limitations of the standard. If for example UTP CAT-5 cable is used with a typical capacitance of 17 pF/ft, the maximum allowed cable length is 147 feet.


Or for CAN:
A number of different data rates are defined, with 1Mbps (Bits per second) being the top end, and 10kbps the minimum rate. All modules must support 20kbps. Cable length depends on the data rate used. Normally all the devices in a system transfer uniform and fixed bit-rates. The maximum line length is 1Km, 40 meters at 1Mbps. Termination resistors are used at each end of the cable. The worst-case transmission time of an 8-byte frame with an 11-bit identifier is 134 bit times (that's 134 microseconds at the maximum baud rate of 1Mbits/sec).


B. Morse
 

retched

Joined Dec 5, 2009
5,207
I was under the assumption that unshielded lines, be it CAN or 232 couldn't reliably be run over 10 meters at any high rates.

I have had problems in my workshop from the large motors I guess, when trying to implement a little over 35ft of 232. unshielded. I ended up having two 20ft stations and it worked better at good rates.

I didn't have the chance to try with shielded cabling. But with the 'factory' environment I have had problems.

Have you had any experience with shielded cable and any decent length using rs232?
 

BMorse

Joined Sep 26, 2009
2,675
Yes I have used over 100' feet of shielded cable for RS232 communications without any problems in our shop, (lots of machinery and 3 phase motors, welders,plasma cutters, a lot of high EMF equipment to say the least, I have damaged a couple of cell phones just being near some of the welding equipment!) Unshielded cable will cause some issues at long lengths, I have always found it to be more reliable with shielded cable.

B. Morse
 

retched

Joined Dec 5, 2009
5,207
Then Ill have to bite the bullet and make the switch in cabling.

So for long lengths of network cable runs, the standards for length is in a optimal environment.

Spec:
I would say, go for it. Get yourself a PIC that has onchip ethernet, CAN and serial, get a MAX232 and start experimenting. I would stay with shielded cabling in the factory environment. For an education, it will be invaluable. And remember to get second opinions. As you can see from this conversation between me and BMorse, told me that it was the cabling and not the protocol that was my problem.

As for the communications around the factory, how many different pieces of equipment are going to be reporting to the network? That may also be a deciding factor on which way to go.
 

Thread Starter

Spek

Joined Feb 6, 2009
20
Sorry to bounce this thread back-alive, but I had another question that fits here. But first, thanks for the answers!

I'm struggling between CAN and Ethernet. CAN is still fast enough, but it's hard to tell how much more nodes will come. Another thing, Ethernet is already everywhere in the factory, so expanding it might be easier.

Anyway, another idea popped up. How about WiFi? Maybe this is not the most stable type of connection, but then again, the modules in our case don't need the network connection to operate. It would be annoying if the connections are lost every time, but it's not critical. Neither are slowdowns. WiFi, could it work out? Or will it be a disaster if ~60 nodes are in the air, transmitting data?

@Retched
Currently... ~20 packaging machines, ~20 production machines, 10 data loggers, 4 control units for climate control, and some other small PLC applications. But more will come so 60 or 80 to start with. However, 8 years ago this company had 2 machines in total. Things can grow fast!
 
Last edited:

retched

Joined Dec 5, 2009
5,207
WiFi should be fine. But I would still stick with a tcp/ip standard. It will work with many off the shelf applications, and finding problems will be easy. You can just look for which IP is not responding/sending.

If you want to do a test, Set up a wifi station near where you would by the control room. Grab a laptop and connect to the internet. Walk to every machine and check your connection. This will let you know if you are going to have any problems with rampant signals messing things up.

Ethernet or wifi (wired or wireless) can handle many nodes. You will save a ton of money not needing patchbays, switches,hubs and the such for the wired connections if the wifi will work.
 

Thread Starter

Spek

Joined Feb 6, 2009
20
Yet another technology came across my screen: ZigBee. From what I understand, it works like WiFi but (much) slower to save energy. As mentioned before, speed is not crucial, as long as the network doesn't get overloaded by all those modules.

What I forgot to mention with Ethernet/WiFi or other TCP/IP based solutions, is the client/server model. However, just as with the CANbus, I'd like to broadcast messages and make them available for all other modules. In other words, the nodes are not aware of a server or who's making use of their data. Just throw it online.

Modules should be able to send commands/setpoints to other modules though. With CAN I would nodes "sniff" for command messages with a certain ID.

I'm not sure if this will be easy with Ethernet/WiFi/Zigbee (on limited hardware such as a PIC or Arduino). From the experience I have with normal PC's, I need to define a server, client and specific addresses. I could still first send it to a server, and then let other nodes pick it from the same server, but maybe direct contact is possible as well?
 
Last edited:
Top