wiring multiple sensors with one PLC - sensors

Is it possible to wire multiple sensors with one PLC (let's say S7 CPU 1511C-1 PN) over Modbus or Profinet without additional modules.
Thanks

No it is not possible. There should be a module at the other end of Modbus or Profibus cable. You have to convert sensor signal to digital values inside PLC, that is why.
If you have a sensor that can be connected to Modbus or Profibus directly, the answer to your question is still "No it is not possible" because technically this is sensor with built-in module, and it means that although you connect sensor, you in reality you connect I\O module built on top of sensor.
I think this is important to understand, that you cannot connect sensors directly to any field bus without field bus coupler.

Yes, with Profinet, Profibus DP or Profibus PA, and Modbus, you can connect several sensors to that bus systems. The count and the distance are limited. What you need is a good bus cable, with Profinet you need an additional Profinet switch and the right terminals, possibly also bus termination which are e.g. integrated in the Profibus DP connectors. Be aware to terminate the bus, especially with Modbus, and also spend you money to not make to much stubs in the bus line and use the right impedance for your bus cable.

Short answer - YES. If you're using S7 CPU 1511C-1 PN, then you can wire multiple sensors using ModbusTCP or ProfiNet.
To clarify a bit about Modbus - it is a communication protocol, which only defines how to interpret received data/form requests (how to arrange 1s and 0s). It was developed for single master - multiple slave communication.
However, a number of different physical interfaces are used to send the raw Modbus data (1s and 0s as electrical signals), and they have their own limitations. For example:
RS232 + Modbus - usually 1-to-1 communications, because that's a limitation of RS232 standard (some workarounds are sometimes used).
RS485 + Modbus - single master, multiple slave communication - you could connect multiple sensors. I'm assuming sensors behave as slaves.
TCP/IP + Modbus (ModbusTCP) - single master, multiple slave communication - you could connect multiple sensors. Furthermore, it is possible to do multi-master multi-slave communications, if you know what you're doing and can compromise on some things.
The PLC you mentioned will probably do ModbusTCP, as it only has Ethernet port.
Regarding ProfiNet - it is a standard which defines physical interface and communication protocol. You can use it to connect to multiple devices as it's Ethernet based.

Related

Control multiple BLE peripherals with one central

I am pretty new to IoT and BLE. What I want to achieve is to write on GATT characteristic of at least 100 peripheral devices simultaneously or in a very short period of time(i.e. less than 100ms). Currently my peripherals are Ble nano (nRF51822) with custom GATT service running on them. I am using my Mac as central BLE. I am using Node.js and noble to implement the central. I want to know if such thing is possible at all and if possible, please link me to an example code. :)
You should note that Bluetooth chips for computers are usually (quite arbitrarily) limited to only a few simultaneous connections. Common values are between 3 and 14. Even if you connect a few at a time, send the characteristic value, disconnect and then connect next devices it would be impossible to do this within 100 ms. If you want to send the same data to everyone you should instead let your computer advertise and the nrf devices scan. That way you broadcast the data instead.

What happens if I write to eth0 or ath0?

Recently I encountered several questions on SO regarding working with sockets on a very low level. Here's an example. While looking for an answer, I realised that sockets have relatively low capabilities on OSI Level 2. On Linux, we can specify a protocol when creating a socket, but obviously not all Level 2 protocols are present in the list.
While it is possible to assemble and send an ethernet frame, it's (presumably) not possible to send a 802.11 packet - though it looks like wifi device drivers do convert ethernet frames to wifi packets and vice versa.
This made me wonder, if there are more possibilities in reading and writing directly to device files like eht0, ath0? Is it a socket implementation who usually writes to these files, or a device driver? And who's on receiving side - a NIC driver, a peripheral bus controller?

Maximum number of BLE sensors that could be connected to a BLE gateway at a given instant?

I have this doubt. For example, I have a Smart Wrist Band (measures pulse, body temp), a Smart Gear/Watch (to display text alerts, control calls) and a Bluetooth headset. I need all the three to communicate with my mobile phone at the same given instant.
Is it possible to achieve the same ?
What are the challenges involved if I need to develop an application on my own if I had to achieve the above possibilities ?
Your help is highly appreciated.
Note:
- BLE has star-based network topology and maximum devices per Piconet is 8 including the Master
- Please help me in understanding/visualizing the above theory that I learnt.
Thanks.
The Bluetooth Classic has a limitation of 7 slave devices in a piconet and they are time and hop synchronized to the master ( ie master and slaves share a common physical channel and it is not possible to address more than seven slaves for a master when in Active mode).
In BLE each connection from a master to a slave operates in an independent physical channel( ie LE slaves does not share a common physical channel with the master), hence there is no limitation imposed by the Specification except as specified by the Connection interval and slave latency rules ( Note that individual bluetooth controller manufacturers may decide to limit the number of connections depending on the practical bandwidth limitation).
please see the Bluetooth Classic vs Bluetooth Low energy Topology below.
Is it possible to achieve the multiple sensors ( BLE) and Headset (BT classic) connected to mobile?
Yes it is very much possible, except that there are some BT4.0 controllers which doesn't allow LE advertisement while connected to another BLE device. please check the known limitations in a particular bluetooth controller.
It's the Bluetooth controller that has the limitation. Different Bluetooth controllers have different maximum number of concurrent connections. It's usually between 5 and 14. However Android has an additional hardcoded limit of 10 for some strange reason.
Other than this, there shouldn't be any particular challenges.

bluetooth low energy sequential connections

I am programming Nordic devices as BLE peripherals. My smartphone acts as BLE central. I would like to transmit data from my smartphone to all the devices one after the other.
Is it possible to compute the time that the smartphone requires to jump from one connection to the other?
Knowing the BLE throughput and the time needed to jump from one connection to the next one, I could compute the time that the whole process would take. Nothe that I do not want to connect all the devices at the same time but one after the other.
Best regards

Ethernet + Serial port in Linux

I want to implement a driver in Linux, that has a Ethernet stack but the data going out on hardware will be a serial port. Basically, I want to register my serial port as a Ethernet driver. Does anyone have any idea if this is possible?
I want to be able to push IPv6 and/or UDP packets out of the serial port and in a similar way receive the packets via a serial port and pass it up the Ethernet stack.
I do not want to use the solution of serial-to-ethernet convertors(external hardware that convert a serial port to a ethernet port) but have that in my PC itself.
I tried PPP over the serial port and it works well. I am also told that I can do FTP, HTTP etc using the PPP. Reference to this - http://www.faqs.org/docs/Linux-HOWTO/Serial-Laplink-HOWTO.html
I have tried to hack the code from a RealTek Ethernet driver with a serial driver but not able to gain much success. Rather I do not know the stack of either to actually do anything meaningful. Any advice, guidance or tutorials would be helpful.
Thanks
Aditya
You need to get back to de basics on networking, the way I understand you question is: "I have a serial port and I want to use is an Ethernet link". Sorry to crush your dreams but you don't have the real hardware to do so, I'll elaborate on it.
A serial connection is a physical connection that requires 3 wires (at least) tx, rx and ground. On the logical side you have an IC that coverts binary data into signals that are represented by discrete voltage ranges.
Ethernet is a layer 2 protocol, the layer 1 is provided by the technology used to transmit the signals (coax, up, fiber etc.) As you might see by now, you need a different set of hardware to convert the logical Ethernet frames into a stream of digital numbers, in fact this is call framing.
Since Ethernet has been an easy to use protocol it has been implemented as e preferred protocol for many network operators, of course one of the biggest is PPPoE where you have a PPP session over an Ethernet link. Of course this won't work with your example neither since you're trying the opposite.
If you're just learning and have all the time in the world you can attempt to write your own Ethernet framer over serial lines. This means you need to implement IEEE802.3 into the driver and then you need to serialize the data to push it as a stream of bits over the serial line. Of course note the following drawbacks:
Your driver won't be able to fully support Ethernet, you need some support at hardware level to implement some signaling (example, auto negotiation, CSMA/CD, etc)
You driver will be pretty much useless unless you back in time where 115.2kbps is top speed in data transfers
IMHO there are more exciting projects that you can pick up in the networking field for device drivers. You can for example attempt to buy a NIC and develop the device driver for it from scratch and you can optimize certain areas. Finally, remember that most of the Ethernet implementations are now done in hardware so you don't have to do anything but filling a few registers on the MAC and voila!
SLIP and PPP do already what you want.

Resources