Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read and Write Serial Port created via Bluetooth

All right... I understand the situation.

 

Recently I successfully comunicated with the bluetooth serial port. However, I am having a little problem:

 

In the main window I put a meter to aquire the data from my smartphone program. The program works well but for some reason I cannot measure a value between 1 and 10... I can only measure values with a range 10 to 100. What could be wrong with the code? Is there any way to measure values with 1-10 range?

 

Here is the code and the main window.

 

Message Edited by Borges on 08-18-2008 01:11 PM
Download All
0 Kudos
Message 11 of 58
(3,528 Views)

Hi Borges,

 

Are you getting data returned in the 0-10V range? Check to be sure the string value is being converted correctly. You can create an indicator for the string data and be sure that it corresponds to the numeric data after the conversion. If you are reading back decimal data, you may need to use a Fract/Exp String to Number Conversion VI. What are you experiencing when 0-10V data is returned? Does the indicator stay at 10 or 0?

Steve B

0 Kudos
Message 12 of 58
(3,500 Views)
When my sensor is marking a value between 0 and 10V the meter does not respond. The meter indication is only responding to values between 10 and 100. What could be wrong here? I could use some help to fix the problem.
0 Kudos
Message 13 of 58
(3,497 Views)

Hi

 

can you psot the vi you are using?

maybe it is the decimal character, that is giving you problems.

 

greetings from the Netherlands
0 Kudos
Message 14 of 58
(3,494 Views)

It´s currently posted on the post located in the top of this page.

 

There are two files in there.

0 Kudos
Message 15 of 58
(3,492 Views)

Hello,

 

Can you increase the bytes to read to 10 bytes (instead of 2) and make an indicator (or probe) on the string you get back form the read VISA.

Then post the result as a new picture. This will help alot to debug the problem.

 

BR

Thomas

0 Kudos
Message 16 of 58
(3,483 Views)

I did that procedure before. However, after that the transmition stays awfuly slow. But the reading works all right. How I could optimize the transmition? I was thinking in modify my instrument to transmit at 115200 bauds.

 

But is there any way to perform some sort of code optimization?

0 Kudos
Message 17 of 58
(3,460 Views)

Can you post wat the content of the received string is when you ask for more than 2 characters.

Is there some end character possibly?

 

You can always poll how much characters are available in the port (bytes at serial port)

 

greetings from the Netherlands
0 Kudos
Message 18 of 58
(3,457 Views)

It seems that when I set the byte count to 10 a error is triggered and the port is closed. That is strange.. for some reason when I set a byte count greater than 2 this error occurs and the serial port is closed.

 

Here is the screenshot and the .vi

Download All
0 Kudos
Message 19 of 58
(3,450 Views)

This is a timeout, so no more characters are sent.

You simply have to live with that. Maybe only when below 10?

greetings from the Netherlands
0 Kudos
Message 20 of 58
(3,406 Views)