10.1 Scenario 1: OPC Client UAExpert Connecting Directly to Video Kit OPC Server and ICICLE Kit (Stepper Motor) OPC Server
(Ask a Question)Objective: Demonstrate the server capabilities for the ICICLE Kit and the Video Kit.
In this scenario, the UAExpert software which acts as an OPC UA client, connects directly to the OPC server running on the Video Kit, and the stepper motor OPC server running on the ICICLE Kit. Once the connection is established, data can be sent over OPC UA channel to give or read commands.
Starting the Stepper Motor Server on the ICICLE Kit
To start the stepper motor server on the ICICLE Kit, perform the following steps:
- Start the OPC server by executing the following
commands at the command prompt:
- Execute the
cd /opt/microchip/opcua/icicle-kit
command to change to this directory. - Execute the
./icicle-motor-server.py &
orpython3 icicle-motor-server.py &
command to start the server. - Wait until the OPC-UA server starts.
- Execute the
- Note down the IP address of the OPC server. To note down the IP address of the OPC server, execute the
ifconfig
command. - Connect the UAExpert client from PC to the OPC server by using the IP address you obtained by executing the command in the preceding step. For more information, see Establishing a Connection Between OPC UA and Client/Server.
- Start the stepper motor in clockwise direction.
To start the stepper monitor in clockwise direction, in the UAExpert window, set
the values as follows:
- Set the
Stepper Motor Start value to
1111
.
- Set the
Stepper Motor Start value to
- Start the stepper motor in anti-clockwise
direction. To start the stepper motor in anti-clockwise direction, in the
UAExpert window, set the values as follows:
- Set the
Stepper Motor Direction value to
1
. - Set the
Stepper Motor Start value to
1111
. The stepper motor starts spinning in anti-clockwise direction.
- Set the
Stepper Motor Direction value to
Starting the OPC Server on the Video Kit
To start the OPC server on the Video Kit, perform the following steps:
- Start the OPC server by executing the following
commands at the command prompt:
- Execute the
cd /opt/microchip/opcua/video-kit
command to change to this directory. - Execute the
./video-kit-server.py &
orpython3 video-kit-server.py &
script to start the server.
- Execute the
- Note down the IP address of the OPC server. To note down the IP address of the OPC server, execute the
ifconfig
command. - Connect the UAExpert client from PC to the OPC server by using the IP address you obtained by executing the command in the preceding step. For more information, see Establishing a Connection Between OPC UA and Client/Server.
- Start the video streaming. To start the video
streaming, set the values as follows:
- Set the IP Address value to the Windows machine IP address.
- Set the Streaming
Start value to
1111
.
- Update the video streaming. To update the video
streaming, set the following values in the UAExpert window.
- Set the Camera Red
Gain value to
222
. - Set the Vision
Command Control value to
1111
.
- Set the Camera Red
Gain value to
- Stop the video streaming. To stop the video
streaming, set the Streaming Stop value to
1111
in the UAExpert window. The Video Kit video streaming stops immediately.