12-07-2016 10:52 AM
So I have a PicRing of about 30 pictures. And I have a button in which, when pressed, should increment the PicRing by 1. But, it doesn't work. Right now I created a value-property node from the PicRing. Then I attached a +1 increment symbol to it, and then attached that symbol to the Local Variable of the PicRing. But.... when I press the button, nothing happens. The PicRing should go to the next picture, but it doesn't. Absolutely nothing happens. I feel like there is a simple solution for this, but it's been evading me.
12-07-2016 10:58 AM - edited 12-07-2016 11:05 AM
Some code would really help figure out what youre doing wrong, but here is a simple example of doing this.
12-07-2016 11:07 AM
That sounds really convoluted. Simply keep the value in a shift register and use the +1 primitive.
Is your ring a control or indicator?
But yes, please show us some simplified code that show the problem. Tell us how you operate it, what you get, and what you expect to get instead. Thanks.
12-07-2016 11:11 AM
@Wolleee wrote:
Some code would really help figure out what youre doing wrong, but here is a simple example of doing this.
... and if you would make the ring an indicator and wire it before the event structure, it will automatically reset on program start and you don't need any property node at all (In your code, a local variable would be more reasonable than a property node)
12-07-2016 11:40 AM
Here's the code I've got, plus PicRing. And thanks for the example. It is somewhat the same, but you've got a few more details added. Is that a for loop inside the while loop?
12-07-2016 11:52 AM
If you have labview 2015 you can actually just pull the snippet into a blank VI so you can look at the code. There are two important functions in my example that you are missing.
1st, i have a shift register, the nodes on the while loop that work as a variable for storing the value of the pic ring.
2nd, i have an event structure inside the while, this is used to effeciently capture the button press.
12-07-2016 11:58 AM
@Wolleee wrote:
If you have labview 2015 you can actually just pull the snippet into a blank VI so you can look at the code.
He does, VI Properties of the attched vi (General Page) show the source version as 15.0
I even have a Jing Demo of poofing code from a snippet
12-07-2016 12:24 PM - edited 12-07-2016 12:27 PM
@JÞB wrote:
@Wolleee wrote:
If you have labview 2015 you can actually just pull the snippet into a blank VI so you can look at the code.
He does, VI Properties of the attched vi (General Page) show the source version as 15.0
I even have a Jing Demo of poofing code from a snippet
Jeff,
Thanks for that tip. Ive probably picked up at least 3 or 4 useful tips from you this week alone.
Shogun Orta,
You are also using an indicator for your pic ring, so based on the code you presented you dont actually need a property node. You can wire the pic ring value directly to the indicator.
12-07-2016 12:34 PM
@Wolleee wrote:
Jeff,
Thanks for that tip. Ive probably picked up at least 3 or 4 useful tips from you this week alone.
I've been wondering If I gained a stalker. nice posts by the way
12-07-2016 01:12 PM - edited 12-07-2016 01:17 PM
@ShogunOrta wrote:
Here's the code I've got, plus PicRing.
Some quick comments:
Here's a implementation without event structure to keep things simple and just to give you some ideas. I would recommend to go over some tutorials. (Yes, an event structure should be used once you are more familiar).