From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display images in sequence

LabVIEW 2013

SQL Server 2012

 

I have a VI that reads an image directory and the user can cycle through the images with a next and previous button. The image directory is stored in the SQL database just wondering how would I cycle through the images and display the information on the images that is stored in the database sequentially as the user cycles through the images?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 6
(2,747 Views)

Hi PauldePaor,

 Can you please post your code in PNG format?

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(2,729 Views)

Hi srikrishnaNF see attached my code in PNG format

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 3 of 6
(2,726 Views)

Hi PauldePaor,

 May be displaying the image info over the image is a tough task,but you can display that info beside the image.Intially you need to read the whole database in one go and store that info in a global variable.For that please keep a flat sequence and keep the database reading part in the first frame.Then in the next frame you put the logic of sequencing thorugh the images by pressing the next button or previous button and at the same time please read the information from the global variable as well...

 I cant place the code at the moment as i dont have database connectivity toolkit...

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 6
(2,719 Views)

Wow. Er - PauldePaor, don't do that!

 

SrikrishnaNF: The data is already in a data structure (database) so pulling that all into working memory is pointless. I even have demonstrations that show SQL is faster than working memory for very large datasets. A global variable, and sequence structure? These are not on the list of best practices, espescially with small applications like this!

 

PauldePaor: Am I thinking correctly that a database record will resemble:

Table Images [File path, info field 1, info field 2, info field 3]

 

I would reccommend starting from the New... Event driven producer consumer pattern

 

The consumer will be responsible for reading a database entry and displaying data in indicators, and the event structure captures user input.

This should do away with all of your local variables (passable exceptions would be for initialising input / control values)

Currently you have some data processing in your event structure. What you have is OK, but to maintain a responsive UI, the Event structure should be minimal.

_____________________________
- Cheers, Ed
0 Kudos
Message 5 of 6
(2,695 Views)

Attached is a copy of the database layout. I would like to be able to cycle through the images and each element in the database corressponds to that image. As the user is cycling through the images the data from the database updates with the change of image.

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 6 of 6
(2,690 Views)