Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Wireless communication through labview

We are students at Northwestern University.  Our project is to control a robot wirelessly obeying basic commands to turn or go straight.  We have tried using VISA and bluetooth client/server programs in LabVIEW 7.1.1, but cannot establish a connection with the robot.  The signal needs to be sent out on COM4, and will receive a signal on COM5.  Can you suggest any pre-built programs that can send and receive information in real time on LabVIEW 7.1.1.  The data being sent and received is serial.
0 Kudos
Message 1 of 10
(5,740 Views)

Hi pdawsey:

Serial communication in LabVIEW is always done using VISA.  I have attached a basic VISA program to get you started.

What do you mean by "send and receive information in real time"?  Are you using LabVIEW RT?

Regards,

Emilie S.

0 Kudos
Message 2 of 10
(5,719 Views)
We have a chip that reads basic stamp and a gyroscope on the robot.  The robot will move based on the command it receives from the chip.  The gyroscope will send a voltage back to the computer wirelessly on COM5 that can be interpreted as an angular velocity and thus an angle.  We need to be able to take this information, and output a command of 1 or 2 or 3 to tell the basic stamp program on the chip to switch to loop 1 2 or 3 to start turning left, or keep going straight.  This should allow us to control the robot.  We are having trouble connecting with the bluetooth module on our robot.  We can connect using hyperterminal and send commands with a keyboard to make the robot do different things over COM4, but labview is unable to even connect.  As troubleshooting we have made programs that should return a 1 when a 1 is sent.  Our problem is establishing a connection to a certain COM port.  I can provide the numbers for the chip, bluetooth module, gyroscope, etc if that would help.  The whole class is completely stuck here.  Any help would be very very welcome!

Thanks in advance!
Phil
0 Kudos
Message 3 of 10
(5,710 Views)
Sorry, all we have access to is LabVIEW 7 and LabVIEW 7.1.1.
0 Kudos
Message 4 of 10
(5,710 Views)
If you're able to use Hyperterminal, then LabVIEW should work as well. Verify that the port is set up the same and you are sending any necessary termination characters at the end of your command string. Hyperterminal does this for you but you have to program it yourself in LabVIEW. Posting the VI you've written would go a long way in seeing what might be wrong.
0 Kudos
Message 5 of 10
(5,687 Views)
Thanks for your help,

We have tried to work along the lines you suggested, but don't really know where to bulk of our problem lies. We have tried to simply write a number to a serial port using the vi's attached below as suggested in LabVIEW (we even shorted pins 2 and 3 and received no return loop, we removed all of the error signals in the examples given by National Instruments). We have also written a basic bluetooth command program to try to establish a connection through LabVIEW.

The main question we have yet to solve:

  • Can we send commands to a Com port that Hyperterminal is connected to form LabVIEW, or does Hyperterminal take control of the port?
  • The Advanced Bluetooth Client.vi given by National Instruments works to recognize our robot's bluetooth service, what then must be added to our program to send numbers to the robot - either through the bluetooth commands or the serial port commands?
  • Will our solution most likely involve both a bluetooth connection and a serial port connection, or can all of the data be sent through bluetooth?
  • When connecting to Hyperterminal, the only settings that are changed are to ensure that it will connect properly are:
    • In the File>Properties window, under the ASCII Setup button, we check only the:
      • Send line ends with line feeds box
      • Echo typed characters locally box
      • Append line feeds to incoming line ends box
      • Wrap lines that exceed terminal width box
Our intents are rather simple. We want to send a simple number to a bluetooth device. We know what com port it is connected to, Com 8, and we simply want to open a Bluetooth connection and send numbers that it will understand, nothing else.

Thanks for your time,
Stewart and Phil Dawsey
Download All
0 Kudos
Message 6 of 10
(5,678 Views)

If you have Hyperterminal open, then LabVIEW cannot use the serial port. If you open LabVIEW first, then Hyperterminal can't communicate. That's an OS limitiation.

Thanks for the serial VI but I already have the shipping example. What would really help is to see what you're actually sending. You do this by typing in your command in the "string to write" box and setting all the com port parameters. Then, go to the operate menu and select Make Current Values Default. Save the VI and re-post it.

0 Kudos
Message 7 of 10
(5,673 Views)
I am trying to set up a real-time communication between two commputers & a device.
 
Computer A sends signal one's and zero's using bluetooth connection to computer B. When Computer B  recieves signal, it then transmit the information to its serial port. This information is then transmited to the devicevia a serial cable. Can this be done using LabVIEW and has anyone done it?
 
all response appriciated.
0 Kudos
Message 8 of 10
(5,545 Views)

Hi emmas,

LabVIEW ships with example VIs for both bluetooth and serial communication.  You can find these using the NI Example Finder.  Just select "Find Examples..." in LabVIEW, and search for "serial" or "bluetooth".  Programming both serial and bluetooth applications in LabVIEW is pretty straight forward.

0 Kudos
Message 9 of 10
(5,524 Views)

I am dealing with the same challenge as you all are.  I have purchased the eb500 module from parallax and  I am currently trying to communicate through the com port just as hyperlink does.  Have you all made any progress since you last posted you problem?  Any help you can provide in this regard is greatly appreciated. 

0 Kudos
Message 10 of 10
(5,219 Views)