07-28-2008 08:09 AM
07-29-2008 02:55 PM
08-02-2008 06:12 AM
Sputnikrent wrote:
I might be misunderstanding something, but I'm not sure why you're varying the baud rate the way you are. You should define for your PIC what baud rate you want to be sending the data at, and that baud rate will have to be the same on your application (LabVIEW) side. If the baud rates are mismatched you won't be able to receive the data properly.
Are you defining the baud rate for both sides, or just on the LabVIEW end only?
I always make sure the baud rates are the same on both sides.
08-02-2008 08:47 AM
08-02-2008 08:30 PM
08-04-2008 08:42 AM
Instead of posting a partial image (or one hard to read) in a .doc file, please just post the actual VI. Click the Browse button below the message body. Simple and direct. You can post a word doc there as well instead of linking to it.
From the brief look that I did, your array indexing of the serial read appears to be all wrong.
08-04-2008 08:47 PM
Dennis Knutson wrote:
Instead of posting a partial image (or one hard to read) in a .doc file, please just post the actual VI. Click the Browse button below the message body. Simple and direct. You can post a word doc there as well instead of linking to it.
From the brief look that I did, your array indexing of the serial read appears to be all wrong.
08-04-2008 08:50 PM
Dennis Knutson wrote:
Instead of posting a partial image (or one hard to read) in a .doc file, please just post the actual VI. Click the Browse button below the message body. Simple and direct. You can post a word doc there as well instead of linking to it.
From the brief look that I did, your array indexing of the serial read appears to be all wrong.
08-04-2008 09:38 PM
08-05-2008 10:06 AM
Ravens Fan wrote:
One problem you have is you are just reading in a series of bytes endlessly in a loop. (How do you stop the program? You have a False constant wired to your while loop stop terminal. The only way to end this program is by pressing the abort button.) How do you know which byte represents channel 1 and which represents channel2? If you wind up with a 3rd or more byte, it just gets thrown away. If your reads get out of synch with the device that is sending data, you would easily wind up reading the 2nd byte first.You have some complicated and convoluted structures going on with your feedback loops. Try using shift registers instead as they are easier to read. But I don't think you need either shift registers or feedback nodes in your case A boolean condition of =0 and then =True, just means the same thing as equal to zero. You are keeping track of an index value and resetting it when it is somewhere around 80 (not sure because you are always acting on the last loop iteration data). Are you sure you always have 80+ bytes worth of data in the serial read in order to eventually be able to index that high?If you are just interested in 2 bytes, the first and the second, then just put a 2 in front of your serial read for the number of bytes to read.
At the moment I stop the program by hiting abort execution in labview.The only way I know to identify each channel is , by knowing the order the PIC is sending them. that is ch1 then ch2, bak to ch1 etc..... Yes doesnt sound like the best idea,I was thinking one way I can do it is by sending a identification tag byte before sending the channels data... for example..Usartwrite("A");Usurtwrite(Sensor1);.Yer , I changed the visa read number to 2, and and with a reseting limit to 1. So its just ch1 and ch2 alternating "1" and "0"....But still having touble with channels not getting mixed up.. I was thinking it could be reading the data to fast .