07-19-2011 03:11 PM
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!
07-20-2011 01:39 PM
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
07-20-2011 02:24 PM - edited 07-20-2011 02:30 PM
hi 🙂
Programmaticaly.. I need to change it in the program
Can you help me?
thanks!
/Peter
07-21-2011 02:39 PM
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).
Have a great day,
Chris V
07-21-2011 03:51 PM - edited 07-21-2011 03:52 PM
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?
07-22-2011 10:42 AM
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
07-22-2011 02:45 PM - edited 07-22-2011 02:48 PM
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
08-01-2011 09:41 AM
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