11-03-2005 10:04 AM
11-03-2005 10:21 AM
11-04-2005 03:53 AM
11-04-2005 06:54 AM
Hi Greta,
Actually, going to LV7.1 made serial communication easier. But (if I recall correctly), the LV6.1 vi's should still work... I will check to see if it required a smalll modification to how it is indexed in 7.1.
However, you can use the VISA - Serial Port vi's. (Configure, Open, Read, Write, Close) .
Here are some links to useful info. In the meantime, I will look for a past post which talked about going from 6.1 to 7.0 and the impact of the serial port..
Thread 1: Configuring the serial port:
http://forums.ni.com/ni/board/message?board.id=170&message.id=99660&query.id=0#M99660
Thread 2: Getting MAX to recognize the COM port..
This one required a modification to an ini file..
http://forums.ni.com/ni/board/message?board.id=170&message.id=19045&query.id=0#M19045
You may also want to look at the Knowledge Based information:
search:
info:
http://digital.ni.com/public.nsf/allkb/57C21F04AC7FFFCA86256877007996E3
Ray
11-04-2005 09:32 AM - edited 11-04-2005 09:32 AM
Here is more info:
http://forums.ni.com/ni/board/message?board.id=170&message.id=117853
Look at the post from Dennis:
" I always thought that the old ones were confusing with Com1 being port 0, Com2 is port 1, etc. ...
As far as conversion, in the majority of cases I've seen, the conversion was transparent. Loading an old program with the traditional functions will have VIs with the old names but with VISA calls internally. The old port numbers get converted to VISA Resource Names, etc. "
So I would look at the VISA Resource naming of the serial ports. That may be where your problem resides..
However, if you plan to redo the serial communication "from scratch" in LV7.x, then here is a bit of info:
++++++++++++++++++++++++
Initializing the serial Port in LV7:
1. Go to the block diagram.
2. In the Functions Palette, select => Instrument IO => VISA => VISA Advanced and place the VISA Open vi on the block diagram.
3. Wire a "VISA resource name" control to the VISA Open vi. Also wire the Error-IN / OUT clusters appropriately.
4. Select the COMM port that you wish to use to connect to your instrument. (ex: COM1).
5. In the Functions Palette, select => Instrument IO => Serial; this is where you will find most of the useful VISA vi's relating to the serial communication.
6. Place the VISA Configure Serial Port.vi on the block diagram. You can wire the settings to this vi. You can use the Context Help for details (it is useful to show the connectors on the vi).
You can start with the following vi's:
a) "VISA Bytes At Serial Port" which indicates how many bytes are available top be read at the serial port buffer.
b) "VISA Write" Wire the string that you want to transmit to this vi. This vi also provides a return count for the number of bytes at the serial port (echoed data for instance).
c) "VISA Read" Reads the serial buffer as an output string. This is where you will want to wire the byte count (as an input) from the two vi's above.
d) "VISA Close" A very important vi, because it closes the communication session to the COMM port. Very useful if you switch back and forth with a software like HyperTerminal.
I think that this should get you going with the serial port communication. You may want to implement some sort of a loop (while for instance) in order to read the data from the serial port buffer until it is empty. Depending on the speed of the communication, you may also want to place a delay within the loop.
Ray
Message Edited by JoeLabView on 11-04-2005 10:33 AM
11-07-2005 05:47 AM
Hello JoeLabView!
Thank you for your help. It works me the program using VISA.
Now I have another doubt. My necessity to work with the version 7.1 is because I want to pass the program to pocket pc.
And now I have been that the pocket pc doesn't accept VISA, but rather it uses the serial port (the same thing that used with the version 6.1).
I don't understand that the version 7.1 don't accept the serial PORT and to work with pocket pc I have to use it.
As I can know the functions that it accepts me the pocket pc?
I have to make this!!!?
Tool--> Options--> Controls/Functions Palettes--> Palette view PDA-2x????
Greta