8 Sending OPC Commands to PolarFire SoC Video Kit
(Ask a Question)After establishing the connection between the client and server through the OPC UA channel, perform the following steps to start or stop the streaming on the Video Kit.
- From the Address Space pane, drag and drop the Camera Controls object into the Data Access View pane as shown in the following figure.
Figure 8-1. UAExpert Window Important: A Recursive Add Notes dialog appears. Click Yes and continue with the next steps. - All the functionality exported by the Video Kit such as video streaming start, video streaming stop, and so on are made visible in the Data Access View pane as shown in the following figure.
Figure 8-2. Data Access View
The following table lists the Video OPC UA exported APIs and features.
Display Name | Valid Values |
---|---|
Streaming Start | Set the Streaming Start value to 1111 to start the streaming. The default is 0 . |
Streaming Stop | Set the Streaming Stop to 1111 to stop the streaming. The default is 0 . |
Vision Command Control | Set the Vision Command Control to 1111 to update everything else. The default is 0 . |
Camera - Green Gain [0-255] | Any value between 0-255 . The default is 102 . |
Camera - Red Gain [0-255] | Any value between 0-255 . The default is 122 . |
Camera - Blue Gain [0-255] | Any value between 0-255 . The default is 138 . |
Camera - Contrast Control [0-255] | Any value between 0-255 . The default is 154 . |
Camera - Brightness Control [0-255] | Any value between 0-255 . The default value is 137 . |
Camera Gain - Horizontal Resolution | The valid possible screen resolutions are: 432, 640, 960, 1280 or 1920 |
Camera - Vertical Resolution | The valid possible screen resolutions are: 240, 480, 544, 720 or 1072 |
Camera - Quality Factor | Any value between 25-50 . The default is 30 . |
Examples
- To start the streaming in the VLC media player running on a machine with the IP address
192.168.2.100
.- Change the IP address in the Data Access View pane to
192.168.2.100
. - Change the Stream Start value from
0
to1111
. Streaming starts on the Video Kit for the IP Address192.168.2.100
. - Open the VLC media player and load the
video.sdp
file. For more information on downloading the files, see Demo Prerequisites. The live video stream is displayed in the VLC media player.
- Change the IP address in the Data Access View pane to
- To stop the live stream, change the Stream Stop value from
0
to1111
. The video stream from the Video Kit is stopped. - To change the Red Gain value from
122
to222
and the Contrast value from154
to254
.- Ensure that the live stream is running.
- Change the Contrast Control value to
254
. - Change the Red Gain value to
222
. - Change the Vision Command Control value to
1111
. The contrast and red gain values are restored in the live video steam and is displayed in the VLC media player.
- To restore the Red Gain value from
222
to122
and the Contrast value from254
to154
.- Change the Contrast Control value to
154
. - Change the Red Gain value to
122
. - Change the Vision Command Control value to
1111
. The new contrast and red gain changes are applied in the live stream and is displayed in the VLC media player.
- Change the Contrast Control value to
- To change the video Resolution to
640x480
.- Ensure that the live stream is running.
- Change the Horizontal Resolution value to
640
. - Change the Vertical Resolution value to
480
. - Change the Vision Command Control to
1111
. The new video resolution changes are applied to the live stream and is displayed in the VLC media player.
Important:
- The VLC media player
video.sdp
file can be downloaded from the website. - Ensure to change the IP Address mentioned in the SDP file with the local computer’s IP address where the VLC media player is installed.