04-10-2022 05:38 PM
I've been studying the code you posted for my vending machine and I have some doubts, I don't know if the forum is the proper place to make questions, if not, just dismiss them.
It's not clear to me how to deal with the local variables and unbundling the clusters, for example, let's say i would like to display on a separate numeric control the amount of each product, how do I even unbundle it?
It's so unclear to me still, I understand what it's telling me on the probe, but not to its entire extent. I've tried doing an array and then unbundling as you did on the loop.
04-10-2022 06:02 PM
I would just add another numeric to the cluster.
04-10-2022 09:16 PM
@Blancoys wrote:
I've been studying the code you posted for my vending machine and I have some doubts, I don't know if the forum is the proper place to make questions, if not, just dismiss them.
It's not clear to me how to deal with the local variables and unbundling the clusters, for example, let's say i would like to display on a separate numeric control the amount of each product, how do I even unbundle it?
It's so unclear to me still, I understand what it's telling me on the probe, but not to its entire extent. I've tried doing an array and then unbundling as you did on the loop.
Please keep asking questions!!! It's the best way to learn here. 🙂
04-11-2022 08:30 AM
Hello, it's me again .. I've been trying to make sense out of the code you designed, and I have a hard time getting some things.
1. What does "-1 case" stand for? I think it's false
I tried wiring the exact same way but it tells me they're of different type, however they're both the same type.
2. I have wired also the same way the timer, but it shows me a red dot. I understand the red dot is it means it's a different data type, however, it's numeric.
3. Why is on the approach using "In Place Element Structure"? My understanding is that it's better for performing and that the information used is stored in memory, however, why is it better than normal bundle/unbundle right now?
4. Why is my shift register not working? According to my understand of what I'm reading is that it's the exact same type (both the source and resulting cluster are the type definition).
I've attempted replacing it and wiring again ..
Thank you for your time as always. 🌞
04-11-2022 09:50 AM - edited 04-11-2022 09:53 AM
I'll have a look at your code later....
04-11-2022 10:43 AM
Many thanks! 🌞
I've fixed the mistakes I had with the suggestions you made.
The last shift register wasn't working because I had in the type definition no array (I would put it into the array in the front panel), and then I would initialize with an array, so it was passing a cluster with no array.
Thank you for your suggestions and your time.