03-21-2015 03:10 AM
hello every body ...
I am trying to send linux commnad to my robot through labview ..
i connect it by VISA . bluetooth over USB .
i faced 2 poroble .
1- it keep send the same command all over the time .
2- timeout problms.
my VI attached ..
please help me
Solved! Go to Solution.
03-21-2015 03:26 AM
Hi manesaid,
1 - It is like you have programmed it. So it's not a problem, it's a feature…
2 - That could be realted to your "Data bits" property. Why do you read that at all? What's the purpose of reading the "data bits" setting you already know from wiring the VISASerialPortInit?
You use the TermChar, atleast you have it configured. If that's the case: get rid of that (wrong) property and use a constant (but sufficient high) number…
03-21-2015 03:37 AM
thanks GerdW
my robot have linux OS .
the only way to talk to it using buletooth over USB .
the part of Data bit in you coment i don't get it ...
i will explain to you the idea of the VI .
first to log to the robot i enter root
then to opnen the programme in it Ienter the command
the i have list of command i want to do it .
the proble i cant control the flow of the data .
what is want enter the first command wait for respons and enter the second command on wait for the response .
it gust like when you work with terminal or CMD
03-21-2015 05:31 AM
1. Use a button and an Event Structure to tell your program when to send the data.
2. It sounds like your robot is not always sending data back. Or if it is, it is not more than 8 bytes. You could use another loop for reading of the serial port. You may want to take a look at this thread to get some ideas: http://forums.ni.com/t5/LabVIEW/Write-and-read-serial-port-simultaneously/m-p/3106900#M890338
03-21-2015 07:44 AM
03-21-2015 10:44 AM
how i can conect the button with the envent case . what is the proper way to do it
03-21-2015 11:03 AM
03-23-2015 04:38 AM
@manesaid wrote:
how i can conect the button with the envent case . what is the proper way to do it
If you do not know how to use the Event Structure, you definately should go through some of the online tutorials (many of which are free).
3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products
But in a nutshell, you simply put down an Event Structure, right click on it and click Add Event Case. A dialog will open up that will allow you to create a case for the button's value changing.
03-23-2015 07:52 AM
Also, 'Data bits' is not the correct property node to use here. The data bits property defines the number of bits used for the data (normally 7 or 😎 - it's part of the configuration of the serial port.
What you are looking for is 'Bytes at Port' - this tells you the number of bytes in the receive buffer. As others have said though, it is generally better use a termination character if your device is sending one.
03-24-2015 12:46 PM
thank you alot bro ... those links are very usful