05-15-2014 09:16 PM
Hello,
I'm trying to acquire the ammount of samples through an USB port, but i need to get 1000 samples per second from vis, but i don't know how to program it so it gives me that number. My actual samples per second is 60, how do i program it to raise this number to 1000?
All the 1000 samples are received by the USB port.
05-15-2014 09:24 PM
05-16-2014 12:38 PM
Sorry for don´t put the information ealier. I'm trying to acquire a ECG signal using a zigbee for communication with Labview and I need more points to plot the graph.
Here is the block diagram. The USB is serial (baud rate 38400, No parity, 8 bits, 1 stop bit)
I´m sending what I can get now.
05-19-2014 09:28 AM
i'm trying to open your poject here but i'ts missing a control called "teste quarta feira que funciona.ctl".
If i ignore it the Waveform Chart 2 have a type definition error and i can't simulate your program.
I'm trying to figure out something from your block diagram.
05-19-2014 10:01 AM
OK, you have a few novice mistakes there.
Casting a string to a VISA session is not going to close the VISA session
You enabled the term charater and then read only 1 character? that makes little sense if any.
a single char String to byte array reversed? converted back to string then cast straight back to a U8? Thas a lot of code to get what you started with!
05-19-2014 11:11 AM - edited 05-19-2014 11:12 AM
Since it is quite obvious you are getting binary data, you want to turn off the termination character.
There is no need to set the buffer size. The default should be plenty big.
As Jeff pointed out, you have some code in there that just does nothing. One of these is your filter. A filter on a single point won't do anything. What you likely really want to use is one of the Filter Point By Point VIs (Signal Processing->Point By Point->Filters PtByPt).
It is also apparent that you are using the Run Continuous button to run your code. DON'T DO THAT!!! That is for specific debug reasons only. For your appliations, you need to use loops to run things over and over again. You only need to open the port once before your main loop and close it once after the loop.
Here, I simplified your code and put the reading of the serial port into a loop so that it just keeps reading until you hit the stop button. DO NOT USE THE ABORT BUTTON IN THE TOOLBAR!!!