LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Camera in Remote Panel.

Hello,

 

This is the first this grad student has played with activex objects, so bare with me.

 

A statement of my problem: 

 

On the local computer I have connected a router that connects via TCP to a wireless camera through a web interface and an activex add on. 

 

The goal is to get the activex object in a container in a labview 8.2 vi and then host this vi on the NI webserver to be able to connect via remote panel from, say, home.

 

The router is the local computer's internet gateway as well and I have appropriate ports forwarded for the camera.  The VI is set up so that even on the local computer the RemoteHost setting for the ActiveX  object points to the WAN address.  In the attached VI, xxx.xxx.xxx.xxx is the WAN IP address of the router but I didn't want anyone and/or his brother to peep on my camera.  The VI works fine on the local computer and I can copy it to my home computer and it runs fine from here too.  When I use the web publishing tool on local and connect to the remote panel at home, everything loads except the image, it's just a gray container.

 

I got the settings for the property node from the source code of the camera web interface.  Any thoughts are appreciated.  Are there other ways to accomplish my goal?

 

Thanks

0 Kudos
Message 1 of 7
(3,013 Views)

I should add that both local computer and home computer are Windows XP machines, both have the add-on installed and I'm always using Internet Explorer for connecting to the remote panel. 

0 Kudos
Message 2 of 7
(2,990 Views)

Hi dobrien,

 

What you are seeing is expected behavior for an ActiveX object in Remote Front Panels.  The following link explains this in detail.

 

Why Doesn't My ActiveX Object Update in a Remote Front Panel?

 

Justin D.

Applications Engineer
National Instruments
0 Kudos
Message 3 of 7
(2,979 Views)

I came across that link while I was trying to solve this problem.  So as I understand it, when I load the remote panel at home it calls on the ActiveX server on my machine here at home which doesn't know the settings passed to the one on the local machine.  These are just static settings, they tell the ActiveX server where the camera is on the web, there is nothing tied to the local machine about these settings.  Why don't the settings get passed to my home machine when the remote panel loads?  I'm not trying to control anything in the container. 

 

?

0 Kudos
Message 4 of 7
(2,974 Views)

Hi dobrien,

 

You can try changing some of the settings of your vi.  If you navigate to tools>>web publishing tool you can change the viewing mode to "Monitor".  This will display an image of the front panel that won't give the user control, but it doesn't sound like that is necessary for your application.

 

Hope this helps.

Justin D.

Applications Engineer
National Instruments
0 Kudos
Message 5 of 7
(2,940 Views)

I don't need to control the camera, but I do need to control what the camera is watching.  So the vi I posted is going to be a subvi in a main program.  Is there any way to pass the static settings of an ActiveX object from the local computer to the remote computer accessing the remote panel?

 

Another thing I tried was taking the HTML code for the activex settings that I find in the source code from the manufacturers web interface and pasting it into the header space of the web publishing tool.  But this still doesn't get an image in the remote panel.

<SCRIPT LANGUAGE="JavaScript">
function Init() {
cvcs.RemoteHost = "xxx.xxx.xxx.xxx"
cvcs.RemoteWeb = 92
cvcs.RemotePort = 0
cvcs.Timeout = 5
cvcs.AuthType = 1
cvcs.PreviewFrameRate = 1
cvcs.PreviewWidth = 320
cvcs.PreviewHeight = 240
cvcs.DeviceSerialNo = "YWRtaW46c3F1MXJyZSE="
window.setInterval("ShowFrameRate()", 1000)
}

</SCRIPT>
0 Kudos
Message 6 of 7
(2,932 Views)

Hi dobrien,

 

It doesn't matter if you can pass the "static settings" of an ActiveX object.  ActiveX allows for different software programs to interact.  ActiveX is calling the camera driver on the computer running the remote front panel to set these settings and display the image in LabVIEW.  ActiveX cannot communicate over an internet connection to access the camera driver.

Justin D.

Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(2,896 Views)