03-22-2023 12:33 PM - edited 03-22-2023 12:39 PM
Hello readers, so what I am trying to create is or should be pretty simple. I am trying to use this FGV as a way to write and read for four different indexes. Not sure if this should be that easy as instead to have four different FGV to do the same thing just base on the indexes.
03-22-2023 01:34 PM
Hi A3,
@A3Ros wrote:
Hello readers, so what I am trying to create is or should be pretty simple. I am trying to use this FGV as a way to write and read for four different indexes. Not sure if this should be that easy as instead to have four different FGV to do the same thing just base on the indexes.
What is your question?
Why don't you use an array inside your FGV? Why do you need to hold 4 different bool values in 4 shift registers in (probably) 4 cases of y case structure???
Hint: we cannot debug/edit/run images in LabVIEW…
03-23-2023 03:41 PM
> Not sure if this should be that easy as instead to have four different FGV to do the same thing just base on the indexes.
I'm assuming that all of your "Channel" cases are all the same. This is not ideal.
If you find yourself repeating code with little or no differences, always consider rethinking the problem.
As much as I like spaghetti, it doesn't go well with software (error prone and hard to maintain).
Check out the attached code (LabVIEW 2018).
On first call it initializes an array then performs the requested action.
03-24-2023 04:33 AM
I'd make it an array internally and just index in/out one.
03-24-2023 09:48 AM
Actually this is what I wanted it. I figured it out after posting this.
03-24-2023 11:17 AM
@A3Ros wrote:
Actually this is what I wanted it. I figured it out after posting this.
That'll work, but if you just make it an ordinary array you can skip the inner case structure altogether.