Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

VisualStudioC++ & datasocket to send image to LBV

Hello,

I've a problem as I have an application in VSC++ to acquire from a triggered cameras. The image needs to be transferred to a separate LBV 8.5 application to be analyzed and do other actions...

Actually the C++ application grab and save the image in Jpg format and the LBV application load and analyze it.  But we can go faster than 1 image every 2-3sec. I need 1 image per second.

I cannot recreate the grab app. in LBV as the camera is USB and under LBV the acquisition from many USB cameras in parallel doesn't work well..

 

My idea is to use datasocket server (already used in this LBV application to transfer other data's) to transfer also the image from the C++ application to the LBV application, instead of writing and reading on the HDD the image.

My point is that I' brand new in C++ and I don't know how to transfer image via datasocket with VS C++

We use Visual Studio 2008 and LBV 8.5 DevSuite (I got also the 8.6, but not yet installed....)

 

Is there anybody could help me in order to write the correct programming to make datasocket server sending the image from C++ to LBV?

Thank you very much indeed

Marco

 

   

0 Kudos
Message 1 of 4
(7,191 Views)

Hi Dreamer,

 

if you want to perform image transfer with datasocket you can start from this example code:

 

Transfering Images with DataSocket 

 

You can test this in LabVIEW and then export the programming model to VC++.

 

Hope this helps,

 

Best regards,

 

Fabio

 

 

 

Fabio M.
NI
Principal Engineer
0 Kudos
Message 2 of 4
(7,169 Views)

Thank you Chuck_81,

the system works fine..I used already datasocket to transfer image within LBV applications.

My problem is that I don't know how to do it in C++ as I didn't find any documentation explaining that...I got only in VB, but it is not the same thing. (and I'm brand new in VSC++)

I need samples or indication to write the C++ code to connect to datasocket server (already running) and transfer to dstp://localhost/image1 the image I acquired.

 

Therefore I will get this image in LBV, reading datasocket, and I'll manage. This part of the job is clear to me..

 

My dark box is the C++ part.  I don't know how to implement the DSwrite code in C++. 

Could you help me on that??

 

Thank you very much

Marco

 

0 Kudos
Message 3 of 4
(7,165 Views)

Hi Dreamer,

 

here's an attachment with a simple example.

 

Moreover, do you have Measurement Studio for Visual Studio 6? If so, there are some examples shipping with it that can be useful as a starting point.

 

Hope this helps,

 

Best regards,

 

Fabio

Fabio M.
NI
Principal Engineer
0 Kudos
Message 4 of 4
(7,160 Views)