Hello,
I need to write a program to communicate with a Data Acquisition board. There are about 10 commads and each has a different number of bytes associated with it. For example command-1 has 4 bytes which need to be send to the DAQ, command 2 has 6 bytes, Command 3 has 4 bytes etc...
When the board responds back to the commands I send, it responds back with different number of bytes for each command. For example, When Command 1 is send to the board, it responds back with 3 bytes of data, whereas when command-2 is send it responds back with 5 bytes of data.
Each data byte received by my labView program from the board, needs to be displayed after some processing has been done. This processing may or may not happen on all the bytes of data got back.
I want the program to be scalable, so that if more commands are added later on, the display and the processing changes in accordance with that.
What will be the best approach for such a system ? I want the system to be dynamic, and dont want to repeat or re-write the code for each case statement ( case statements will be decided by the commands).
Any input is welcome.
Thanks,
birapxi