LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial example

I'm using LabVIEW 7.0 and I'm trying to output text to the serial port.  I've null-modem'd over to a laptop and verified that I can send data out.  I opened the example Serial.vi and turned off the Read option.  But when I run it, I get "Error -1073807202 occurred at Property Node in VISA Configure Serial Port (Instr).vi->LabVIEW <-> Serial.vi".  The port settings are all default - 9600, 8N1, no flow control.  I've toggled the Close option and there was no change.  The only thing I'm curious about is the resource name:  "ASRL1::INSTR".  I changed it to "ASRL1", but no change.  The other two serial examples don't run either, giving errors in Configure Serial Port.  Any ideas?
 
0 Kudos
Message 1 of 11
(5,913 Views)
The error code means that you don't have VISA installed. Install it from the drivers CD or download the newest version from NI's support site.
0 Kudos
Message 2 of 11
(5,908 Views)

Hi guys,

Please excuse me for piggy-backing on this thread.

The VISA dependency has been a pain and I've wanted to try the following - as a work-around:

Under Tools menu/Instrument IO/IO Compatibility/Serial Compatibility

There are serial IO VIs that don't (appear) to use VISA - perhaps someone else knows whether this would work(?)

Regards.

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 3 of 11
(5,908 Views)
The VI's you are referring to are the "old" serial port VI's, which are no longer supported by NI. In fact, NI may not even include them in LV7 (I've forgotton, but I think that's the case).
I feel your pain. I was very hesitant to embrace the VISA standard and use the VISA functions in place of SerialWrite, SerialRead, etc, but one I did, there's no looking back. My new applications are more robust and faster because of VISA.
Oh, and if you DO use those old serial VI's, LV will force the VISA standard "underneath" anyway. So you might as well stick with VISA.


Richard






0 Kudos
Message 4 of 11
(5,894 Views)

Also, a lot of the objections to using VISA for just serial has been eased by the option to install a smaller serial-only VISA run-time engine.

As mentioned, the old serial drivers are obsolete and no longer supported. I also seem to remember seeing posts about the old drivers no longer working in newer OS's, when used with USB<->Serial, and a few other issues.

0 Kudos
Message 5 of 11
(5,869 Views)
I downloaded the latest VISA package (v3.3.1), but it wound up crashing LV7.  Couldn't open any examples and had to do an entire reinstall.  Then I installed VISA from the original CD and it works now.  Thanks for your help.
0 Kudos
Message 6 of 11
(5,846 Views)
 I NEED to MAKE A CONVERSION OF A NUMBER TO A STRING TO TRANSMIT IT VIA SERIAL IN A DECIMAL OR BINARY WAY, FOR EXAMPLE, IF I HAVE THE NUMBER 5 IN ASCII THAT I SPEND AT 00000101 OR 5 IN DECIMAL.

THAT HAPPENS TO ME IS THAT I HAVE THE NUMBER 5 IN A NUMERIC CONSTANT AND IT TRANSMITS IT TO ME AS 53 IN DECIMAL.

WHAT WAY CAN TRANSFORM THIS INTO DECIMAL OR BINARY FORMAT SO THAT IT CAN BE TRANSMITTED VIA SERIAL AND DOES MICROCONTROLLER UNDERSTAND IT LIKE IT IS?
0 Kudos
Message 7 of 11
(5,420 Views)
I have successfully used the VISA controls to communicating and controling the third party Instrument over the RS-232 port.
0 Kudos
Message 8 of 11
(5,418 Views)
I NEED TO MAKE A CONVERSION OF A NUMBER TO A STRING TO TRANSMIT IT VIA SERIAL IN A DECIMAL OR BINARY WAY, FOR EXAMPLE, IF I HAVE THE NUMBER 5 IN ASCII THAT I SPEND AT 00000101 OR 5 IN DECIMAL.

THAT HAPPENS TO ME IS THAT I HAVE THE NUMBER 5 IN A NUMERIC CONSTANT AND IT TRANSMITS IT TO ME AS 53 IN DECIMAL.

WHAT WAY CAN TRANSFORM THIS INTO DECIMAL OR BINARY FORMAT SO THAT IT CAN BE TRANSMITTED VIA SERIAL AND DOES MICROCONTROLLER UNDERSTAND IT LIKE IT IS?
0 Kudos
Message 9 of 11
(5,390 Views)
If I understand you correctly, all you have to do is typecast your number to a string. If you right click on the string indicator and select 'Hex Display', you will see '05' which is 0000 0101 in binary.
 

Message Edited by Dennis Knutson on 09-18-2006 10:52 AM

Message 10 of 11
(5,379 Views)