01-14-2013 04:15 AM
Is it possible reason because i'm doing some filtering in my loop so that could spent certain amount of time and slow down the sistem that it could not read the bytes fast enough?
01-14-2013 09:37 AM
One thing that you should not be doing is use the VISA Bytes at Serial Port. You have enabled the termination character so you just need to set the VISA Read to some high byte count. It will automatically terminate when the termination character is detected.
Some of your processing, such as the Insert Into Array, is not very efficient and you could also be building some large arrays in the shift register. If you want this to run for a long time, you need to limit the size. I would also suggest the Build Array instead of the Insert Into Array.
01-14-2013 11:46 AM
Thank you. I will have to run this vi for aprox. 15min. So is there a problem with the processing stuff inside the loop? When i look at the highlight execution i see that the error comes from the read block.
01-14-2013 12:06 PM
I put the block with the bytes at port away and set the byte count at the read block to 2000. Also changed insert into array with bulid array. But i still get the same error. Where could be the reason for this kind of error:ISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.
01-14-2013 05:49 PM
@john111 wrote:
I put the block with the bytes at port away and set the byte count at the read block to 2000. Also changed insert into array with bulid array. But i still get the same error. Where could be the reason for this kind of error:ISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.
The aim was not to stop you from using bytes at port. You are either going to use bytes at port in a loop until the buffer runs dry, or you are going to terminate the read on a certain character, but not both at once. The way your equipment communicates determines how you are going to handle the read! There are so many, many many threads regarding communications with this intrument. I'm sure you can get your answers by doing a search of this forum.
01-16-2013 06:23 AM
It seems like the problem is with the ftdi-usb chip in the arduino nano. Because when i run the exact same code on arduino uno there are no problems with this error in labview. I was looking on the forums and they suggest that you should put the latency timer on 1ms(instead of16ms). But there is no difference. I also update the drivers and try the example of read.vi... I don't know what else to do.
01-16-2013 07:58 AM
Is it possible that thoso problems are because when i want to end my program i press abort execution instead of stop condition in while loop?
01-16-2013 11:30 AM
@john111 wrote:
Is it possible that thoso problems are because when i want to end my program i press abort execution instead of stop condition in while loop?
If you use the abort button, there is no cleanup. VISA sessions stay open, serial ports stay open, etc... whenever I have to use the abort button, I always have to shut down LabVIEW and restart it. You should never use the abort button as the normal way to stop a running VI. The first thing I do when creating a VI that I know will have a loop is to have a graceful way to exit. The method of exiting will evolve, but it almost always starts out as a simple "Stop" button.
03-20-2013 10:59 PM
Hi!
I want to read data from arduino connected with zigbee using labview visa. But i am having 4 channels to read. 3 for pressure & one for accelerometer. pl. tell me how I can seperate it & show different graphs.
@Jazlan wrote:
Hi =). Im a beginner working reading serial data from an arduino but im facing... Lets do this step by step
I constructed a voltage divider circuit that gives an output ranging from 0 to 5V. The output of this circuit is sent to an analog input pin 0 of an Arduino Duemilanove board.
1) Firstly I plugged in the cable connecting my laptop USB to the arduino board.
2) I went to start->control panel->system->hardware->device manager. Check out Ports(COM & LPT). In my laptop I can see USB Serial Port (COM4). Now I know in Labview I have to read serial data from COM 4.
3) For the arduino side, here is the code to read voltage variations inputted to analog pin 0. The last line 'delay' determines the sampling rate of how we want to sample the voltage divider output:
int potPin = 0; // select the input pin for the voltage divider output
int val = 0; // variable to store the value coming from the sensor
void setup()
{
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
val = analogRead(potPin); // read the value from the voltage divider
Serial.println(val);
delay(10);
}
I have slightly modified the basic serial read write VI.. I have attached the block diagram used with comments. Basically I tried to read serial data, divide by 1023 and multiply by 5 in order to graph voltage variations from the voltage divider circuit. However Im not getting the correct voltage output values . The voltage value just keeps going to 0 and coming again as shown in the pic.
Could you guys please guide me on what went wrong?
Thanks!
04-03-2013 10:05 AM
j'ai une carte arduino mega2560; j'ai un capteur ultrason, et j'ai le logiciel labview2011, je cherche de fonctionner le capteur sur arduino sur le port série TX/RX, avec une supervision sur labview,
capteur ultrason: DYP ME007TX
arduino mega2560
merci