Page 1 of 1

Connecting several Zn-328n

Posted: 22 October 2009, 13:01 PM
by vesteve
How I can connect several Zn-328n?
I have a Zn controlling a machine with it PCB in each machine.
Now I must to connect all machines (60 machines) to a PC.
Pc must send/receive signals to power On the machine and receive data about the machines sensor and control I/O
How I can add an address to differentiate the orders from one machine to another one?
Which method I must use to communicate with all machines? RS232?
Or I must to use another Processor model.

Thanks

Posted: 22 October 2009, 13:10 PM
by mikep
RS-232 is a point to point network i.e. 2 machines communicate. What you need is a bus network where multiple devices (including the PC) can share a common bus. Bius networks either have one master (e.g. the PC) and multiple slaves or can have multiple masters. Common examples of bus networks are I2C, RS485, CAN, LIN, and Ethernet.

If the machines are very close together then you could see I2C. More than likely they are tens if not hundreds of feet apart. RS485 is generally simpler and easier than CAN, LIN or Ethernet. There is a RS485 application note for ZBasic devices.

I2C can have up to 128 addresses and RS485 can have 254. The master talks to the slave using its address. Each slave is assigned (hardwired) with a unique address.

You could also use a wireless network such as Zigbee. Note that RS485 interface chips cost $0.50 and Zigbee costs tens of dollars.

Posted: 23 October 2009, 22:20 PM
by stevech
I would think that those machines have Ethernet connectivity.
If only RS232, then an RS232 from Ethernet per machine, or a terminal server that does ethernet to 8 or 16 RS232 would do. Boxes that do this are on eBay used, such as Lantronix, Digi/Edgeport, and many others. Blackbox makes a lot of these. Moxa Nport too.

(postscript: The earlier comment on ZigBee: I preach that ZigBee and IEEE 802.15.4 are two different beasts, as TCP is not IP is not Ethernet). I would never suggest using of wireless of any kind if it's practical to use wire.

Posted: 24 October 2009, 3:14 AM
by dlh
Mike's RS485 app note says only 32 nodes for RS485. This actually depends on the chip used and some allow 256.

There's an excellent article on RS485 at At the PC you need an RS232 to RS485 adapter. B&B Electronics is one source. They also have good white papers on RS485.