FLOW can communicate traffic data with traffic controllers in multiple ways such as SDLC, UDP sinks, and I/O Modules all of which enable adaptive traffic control. This guide will show you an example of a solution based on a physical interface - relays. You will learn how to set up the I/O module and configure the FLOW device to open/close relays based on user-defined image events.
Let's get to it!
What do you need to set this up?
TrafficEmbedded, TrafficXRoads unit or TrafficCamera
I/O Module - Quido (see the end of this article for the list of supported models)
Camera connected to the video analytics unit
To learn the basics of IO Relays please refer to this article: https://intercom.help/datafromsky/en/articles/5733715-using-i-o-expanders-in-flow
Vehicle presence zone and widget setup
The individual I/O relay outputs are turned ON and OFF via the connected FLOW device. A FLOW device can control multiple I/O modules, but a single I/O module can be controlled by only one FLOW device. To have something to send a signal to our I/O module, we need to set up the presence detection zones that will act as “virtual inductive loops”. Login into your FLOW device and click on the Create zones/gates button in the top left corner of the analytics view. We can set up different types of rules and zones to define how the traffic lights should respond in different scenarios.
In our example, we define one vehicle presence zone for the left turn.
At the end of the day, if you have enough outputs in your I/O modules, you can create quite complex conditions through different permutations of combinations or vehicle occupancy statuses of the zones that you set up. Now let's discuss how you can communicate the information about zone occupancy to the I/O module. After we have created the zone, we need to drag it over to the canvas on the right side and also select NOW mode. We also add a category filter and connect it to the zone to filter out pedestrians so they would not create wrong trigger events.
Then we add a Value widget to the zone, also in the NOW mode. Once you add it you can see the widget “Vehicle presence - Left turn - Value” in the Dashboard Tab as seen on the right side of the picture below. Now we are ready to use this value widget as input for the I/O module.
How to set up the I/O module
FLOW devices communicate with Quido I/O modules using a TCP connection, therefore it is necessary to set this as a communication mode on the I/O module (which is set to WEB by default). The I/O module will then act as a TCP server and the FLOW device as a client. To do this we need to go to the I/O module web interface. To access it, enter the IP address of the I/O module into the browser. The IP address can for example look like this: 192.168.88.245. By default the I/O module is in DHCP mode, you should change this to a static IP address for permanent setups. You also need to be in the same network as the I/O module to be able to connect to it with the FLOW device. Go to Settings and change the Communication mode to TCP server as shown in the image below.
Next, we will register the I/O module to the FLOW device using FLOW Insights. You need to log into your unit and go to the Block->Interfaces tab with the Add an interface button in the I/O interfaces section. A pop-up window will show up with a list of supported I/O modules where you need to select the correct type of I/O module and confirm the choice by clicking on Add an interface.
After selecting the I/O module type you need to configure the connection settings. We enter its IP address and define the rules for controlling the individual relays. After clicking on the pencil icon, we find ourselves in the settings of a specific I/O interface, where we can configure the IP address of the I/O module and the name.
By clicking on the Save settings we confirm the configuration and the FLOW device will attempt to communicate with the I/O module. This action will return us to the Interfaces section where under the Status field you can tell whether the communication with the I/O module has been established successfully.
If you see Offline in the status of the I/O interface, it is necessary to check whether the I/O module is turned ON, the network is connected to the FLOW device, whether the entered IP address is correct, and if the I/O module communication mode is TCP.
How to set up the control rules for relays
Next, it is necessary to configure the rules for the individual output relays. New output relays can be defined in the I/O module settings by clicking on the Add an output button. After you click on this button the output will be registered and can be further configured in detail by clicking on the pencil button.
By configuring the output we mean the Naming (under Name field), assigning physical relay (Output ID field) and the definition of control rule for ON/OFF (Output definition field).
In our case, we are using a value widget representing the number of vehicles presented in a zone. Click on the Define an Expression button next to the Output definition. In the expression definition, the widgets from individual defined analytics will be automatically made available for use. Find the “Vehicle presence - Left turn - Value” widget you added to the zone spatial filter and click on it to add it to the expression definition field.
In our case, we simply want to detect whether there are 0 vehicles or more than 0. So we need to create an expression that returns value 0 if there are no vehicles present and value 1 if there are vehicles present. To do this simply click on the “Vehicle presence - Left turn - Value” widget, select value() and type >0 at the end.
Now the FLOW device will turn the selected relay ON and OFF based on the current occupancy of the zone. In this way, you can react to different traffic events by combining different filters and/or custom-defined expressions in real-time. You can also reuse historical data to create more complex rules.
I/O modules combined with FLOW devices allow you to create actionable solutions for various traffic management problems. You can use it as a universal interface with traffic controllers, and directly control the barriers, parking lot gates, warning lights or other devices depending on the user-defined traffic events.
If you have any questions please don't hesitate to contact us using the chat button on the bottom right. To buy I/O modules contact us at email@example.com