In order to better understand what is going on, can you please specify which toolkit you are using? Also, can you please post the inputs and outputs that you are providing to the code and explain what the differences are between what you are seeing and what you are expecting? Finally, if you have a screenshot of your code, that would be a very helpful addition to your reply posting.
Thanks,
David_B
Applications Engineer
National Instruments