LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

input buffer of serial port

If I just feed 1 byte to serial read.vi, will I get the latest data from the buffer or the first data from the buffer? Or, is this a first in, first out or first in, last out buffer?

From labview 6.0, we can use both serial vi or Visa. Are they same? which one is better?


thanks
0 Kudos
Message 1 of 12
(3,480 Views)
Hi connector,

the buffer of the serial port is a FIFO buffer, so you will get the bytes in the same order which the PC receives it.

The compability or sometimes called "old" serial VIs and the VISA VIs are not the same. The VISA VIs have advantages compared to the old VIs.
1. They use a interface with the standard error cluster so you can do better chaining the VIs and better error handling.
2. They can run in separate execution systems without beeing affected by behavior of the user especially when the title bar is holded with the mouse.
3. They include a timeout and termination character mechanism. So you need not to implement this and do time consuming polling.

The disadvantage is that you musst be carefull to use two property nodes if you d
o binary communication to turn of the termination character proccessing.

If you build a standalone application you must distribute the serpdrv file for the old VIs or you must install the VISA runtime. Installing VISA runtime is not included with the installer you can create so you must do this seperatly. You cannot use the alias names "COMx" you must use the resource names "ASRLx::INSTR".

I dont know if VISA is available on all platforms.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 12
(3,480 Views)
Just to add a few comments to Waldemar's great response. I believe VISA is available for all platforms. VISA can also used for GPIB, VXI, PXI and TCP/IP communication so if you plan to use any of those, you only have to learn one way of doing things.
0 Kudos
Message 3 of 12
(3,480 Views)
NI has also stated that VISA is the way of the future and that serpdrv serial function support may be eliminated in future releases of LabView.
0 Kudos
Message 4 of 12
(3,480 Views)
"Al S" wrote in message
news:50650000000500000093C90000-1042324653000@exchange.ni.com...
> NI has also stated that VISA is the way of the future and that serpdrv
> serial function support may be eliminated in future releases of
> LabView.



Whaaat??? Eliminate serpdrv, that wonderful 11k flawless driver? And leave
us with a bloated multi-megabyte, hard to install, complex interface to the
serial port?

My goodness, who at NI told you that?
0 Kudos
Message 5 of 12
(3,480 Views)
It's happening. I think you'll also see a newer, trimmer VISA - maybe a version only for serial support. A while ago on info-labview there was a discussion started by someone from NI (can't remember who), about some of the reasons, etc.
0 Kudos
Message 6 of 12
(3,480 Views)
Is there an emoticon for back-pedaling?
I thought I saw a reply from an NI support engineer in this forum stating that serpdrv support may be discontinued. But, of course, now I can't find it. This best I can do is this: Aaron K. says it's no longer being updated. I couldn't find anybody saying that support may be eliminated.
"We encourage people to use VISA as it is a better technology, and the older serial driver is no longer being updated and worked on. The old vi's are still there in the compatability section.
Aaron K.
Application Engineer
National Instruments"
See his remarks in context here.
I also found many quotes similar to this:
"I would suggest migrating to using the VISA serial functions. These are much more robust and have much better error checking and handling.
Randy Hoskin
Applications Engineer
National Instruments"
Sorry for the scare if your still attached to your serpdrv. I'm still using it myself and don't relish the thought of rewriting years of debugged code for VISA.
0 Kudos
Message 7 of 12
(3,480 Views)
I'm changed the driver of an application from "old" serial to VISA because of the effect "title bar is holded with the mouse" and the communication stopped. This was critical because the device needs a regular life sign from the PC otherways it falls to local operation. We choose a timeout of 5 seconds on the device thinking noone would hold the title bar such a long time.

Since my customer choose a binary based KWP 2000 like protocol the driver isn't VISA or IVI compliant and there is no class for this sort of device (security testers - high voltage, protective ground, isolation). The only thing I had to concern was the termination character processing and the VISA resource name instead of a number. Replacing
the VIs doing a bit on error handling (error cluster instead of number) was all I had to do. And it works fine.

I didn't measure how it effects the cycle time of the application but the change was not so much that it is obvious to the user. The cycle time before was 16 milliseconds on a P II 400 Mhz system.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 8 of 12
(3,480 Views)
"Dennis Knutson" wrote in message
news:506500000005000000BEC90000-1042324653000@exchange.ni.com...
> It's happening. I think you'll also see a newer, trimmer VISA - maybe
> a version only for serial support. A while ago on info-labview there
> was a discussion started by someone from NI (can't remember who),
> about some of the reasons, etc.

A newer, slimmer VISA??? Maybe they could call it...ahhhh....SERPDRV!

But all seriousness aside, now that LabVIEW is porting to mobile devices I
would think keeping the serial VIs alive and backward compatible is in our
best interests. Getting end users up to speed on installing and/or updating
VISA is tough enough on a PC, imagine coaxing them through installation on a

Palm or Zaurus.

A language should be tranparent to a user, not a complication. Serpdrv is
soooo transparent.
0 Kudos
Message 9 of 12
(3,479 Views)
I don't necessarily disagree and many comments like yours came up when the subject was first discussed on info-labview. I'll have to admit that I never use serpdrv any more but then every app I write also uses GPIB and I have to install VISA anyway. Maybe they'll have a VISA in which you can pick which components to install (i.e. VISA serial and GPIB but no VXI and TCP/IP). One of the fun things about LabVIEW is speculating on all of the features that'll be introduced in the next version.
0 Kudos
Message 10 of 12
(3,479 Views)