Hi All,
I am trying to create a GUI based application for SPI communication with a DUT. The goal of this application is to generate custom SPI messages from front panels bitwise user inputs. We have an excel sheet map of all the SPI bits for the DUT. Each bit of the SPI map is intended to be represented as a checkbox on a front panel. There are 1000s of bits in the SPI map. The requirement is to have multiple VIs and each VI would have a group of bits on the front panel(for example one front panel will have the bits which specify configurations of Block A in DUT, a different front panel will have bits specifying configurations of block B). SPI bits would be placed in multiple front panels. So if one bit is changed in one front panel, it should automatically change in another front panel. Each bit should also have its locaton details from the SPI map encapsulated to identify which row of the SPI map the specific bit belongs to.
Also I need to have enum or text box data which are linked to a specific group of bits. So if a bit value (which is included in the group of bits linked to the enum or textbox) is changed then the enum/textbox should also change simultaneously and vice versa. Once all the required bits have been modified, all the appropriate SPI messages which include the modified bits would have to be sent to the DUT. Previously all of this was programmed in Excel VBA and now we are trying to use labVIEW to develop a similar solution.
The following models are some of which I have been looking into to implement this.
1. Make every single bit from the SPI map a shared boolean variable and bind it to front panel check boxes. This way if a bit is updated on one VI it will get automatically updated on all the other VIs where the shared variable is bound. The location of the bit in the SPI map would have to added in the description of the shared variable. I'm still trying to work out how to implement the enum/textbox controls. ( Looking into Xcontrols for an event structure based solution ). I have been reading multiple posts telling to avoid using shared variables but to me it seems like an easier way to bind to front panel objects.
2. Use an array of objects to represent the bits from the SPI map, then use a data value reference/notifier based code so that the same instance of array of objects is present in multiple VIs. The issue here is binding the array of objects to front panel checkboxes,textboxes or enums such that they get updated everywhere each time when the bit value is changed. One way would be to loop through each front panel objects and update the correct front panel object to the correct bit from the array of objects. That would mean loops running all the time trying to update front panel objects.
3. Use Xcontrols (or maybe Objects) for each of the SPI bit and have a list of VIs in which the bit is present and call them everytime the bit is modified. I have not experimented with this model yet.
I am not sure which would be the best way forward or atleast which would have lesser pitfalls or if there is some completely different solution that would be better suited for implementing this. I dont have too much experience with labVIEW, so please feel free to point any any basic flaws in my suggestions.
Also I am planning to use multiple JKI state machines as the messaging architecture between the host,real time and FPGA for interfacing with the hardware.
Thank you!