12-01-2007 07:50 AM
12-03-2007 06:05 PM
Hi Pradeep,
It seems that several of the cases in the case structure are the same. You can eliminate duplicate states by referencing 2 .. 5, or you could even reduce the states to just true and false. Try placing the string indicator outside of the case structure. Also, I think you can combine the two loops that are inside the larger loop. Good luck!
Regards,
Rima
12-06-2007 08:17 AM
Hi Rima,
Thank you for your suggestions, however I would like to clarify some of the points you have suggested.
1. In the case structure, cases 2..5, would be having a different functionality implemented.
2. The critical part of the application is the placement of the loops. I tried experimenting with the code in all possible combinations. If I combine the two loops into one the CAN periodic VI would be called only once before the enable periodic message is enabled. This would not allow the CAN periodic function to run.
3. I have also noticed that if the enable periodic message set to true before the loop gets executed the application loops in the CAN periodic VI and the control does not go to the next state in the case structure.
Due to above reasons I had to use two loops, so that he CAN periodics VI will be executed when the enable periodic message variable is enabled and using a global variable to stop sending of the CAN periodics.
Regards,
Pradeep
12-07-2007 03:05 PM
Hi Pradeep,
If your VI currently works better with two loops, then you should leave the VI that way. You might have to fine-tune a few parts of the VI, but if it works the way it is, then you don't need to change the overall architecture.
Regards,
Rima