LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing this grab and attribute setup program - help needed

hey!
im trying to change camera attribiutes in the program. The VI attached (you can also find it in the examples of labview 2009 under the name "Grab and attribiutes setup")  has many useless attribiutes to me, how can i change it so lets say i will only have frame rate, trigger options and grabbing?

 

I appreciate any help. Thanks!  

0 Kudos
Message 1 of 8
(3,438 Views)

Hi Peter_SPaaw,

 

Are you trying to eliminate the attributes from the table or eliminate access to them somewhere programmatically?

 

Have a great day,

 

Chris V

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,422 Views)

hi 🙂

 

Programmaticaly.. I need to change it in the program

Can you help me?

 

thanks!

 

/Peter

0 Kudos
Message 3 of 8
(3,419 Views)

Hi Peter_SPaaw,

 

Sorry, I think I was unclear in my last post.  Do you need:

 

1) To make not pull out that attributes in the block diagram (I don't think this is what you need)?

 

or

 

2) To programmatically elimiante those attributes from the table?

 

If you are trying to do 2) then you can use a property node to get the items in the tree and then use an invoke node to delete those items.  This code deletes every other entry (and the children).

 

Delete_Tree_Items.png

 

Have a great day,

 

Chris V

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,401 Views)

thanks, that gives me an option. What if i do it different way, specifically using IMAQdx property node? that would be much cleaner for me. I have built this program (i want to be able to control the frames)  but for some reason it doesnt work, any ideas? 

 

 

pic.JPG

0 Kudos
Message 5 of 8
(3,396 Views)

Hi Peter_SPaaw,

 

I have to apologize again.  I completely misunderstood what you were looking for!

 

Okay, so there are two reasons that your code is currently not working.  The good news is it can be fixed:

 

1) You are accessing the IMQdx property node prior to your while loop.  This means that the slider will only be read once and the frame rate set then.  Once your program enters the while loop, that slider will not be read and the property node will not run again.  This is why your program is currently not working.  

 

FIX: What you will need to do is place the property node inside of the while loop.  However, now we run into the second issue . . .

 

2) You cannot change the properties of an IMAQdx task while it is running.

 

FIX: To set values through a property node, we must first stop the IMAQdx task.  Then we can change the property and restart the task.  I would set this up either with an event structure or a case structure so that you only start and stop the task when the value of the slider changes (not every iteration).  The IMAQdx Start & Stop Acquistion VIs are location in the IMAQdx Low Level pallete.

 

Have a great day,

 

Chris V 

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,387 Views)

ok, thanks for the tips. Can you (looking at my code) tell me where should i go from there? Im not really sure where to connect the stop and start modules. I want to make it work for frame change. I got everythng to work but as you said, it only works if i set the values before turning the VI on, I want to be able to change it meanwhile its running

untitled.JPG

0 Kudos
Message 7 of 8
(3,380 Views)

Hi Peter_SPaaw,

 

The event structure needs to be inside of the while loop.  All of your code assigning the attributes should be in the sequence structure in a frame in between the start and the stop.

 

I would also recommend a finite timeout for the event structure so that the stop button can be registered properly.

 

Have a great day,

 

Chris V

Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,358 Views)