11-05-2012 10:21 PM
Can anyone help/guide me in reducing this vi's code without disturbing the functionality of the VI and combine more than two vi's into one single program so that all the variables and controls are visible on single front panel and controlled simultaneously.
The function of these vi's are to a serial data of receive 51 bytes and and split them into individual bytes and process the data.
There are more number of variables in the code, I've posted sample of three channels. But in total there are six channels with similar operations.so please help me reducing the size of the code and combining them into one single vi.then I will manipulate same thing for the rest of the vi's I have.
In the below attachment there are three vi's namely DT1, R1,R2 in respective folders.
11-06-2012 03:23 PM
The first step is to modularize your code.
It is good to have subvi's but still you have far too much detail in your main vi's
Too much indexing and compares. That should be doable in a more elegant matter.
Furthermore: you know why you chose this way and what you need, so compare both vi's and probably they are lookalikes.
And all that is the same can be put in a subvi.
good luck