Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read and Write Serial Port created via Bluetooth

Albert Geven 

 i am sorry for the mistake am keep doing it which is keep labVIEW 2009. i attached the the VI using labVIEW 8.6 

  i am using the hyper terminal and its work when i press any number i can see it using the 7-segment. but i found a way called NI-SPY and i read an article about it but i dnt know how i can test it is it i have to save the data in a file then use the NI-SPY or any other way??

 

plz can i know how i can combine more than 8bit ?? and if i can set the port number as an outgoing and incoming with my module do i have to be worry about the dongle brand ???

 

 

thanx for any advice. 

Download All
0 Kudos
Message 41 of 58
(2,548 Views)

HI

 

One of the big differences between LabVIEW and Hyperterminal is the way that messages are submitted.

Hyperterminal normally adds a CR/LF when you press enter, while LabVIEW just sends the code you type.

Or you have a non default setup for your hyperterminal session .

 

The hardware piece is the same, so if you can communicate in hyperterminal you can in LabVIEW.

 

The program you niceley delivered in 8.6 coding (thanks) is a bit complicated but nice as a structure for splitting up sending and receiving data.

For a driver for your ecg it normally is not necessary to use a queue because normally you know when to expect an answer from your hardware.

 

Look at the examples basic and/or advanced serial read and write in your help/find examples/hardware input output/serial.

 

About sending 12 bit, use 2 bytes on the serial port. And test what order they should be.

greetings from the Netherlands
0 Kudos
Message 42 of 58
(2,537 Views)

hi Albert Geven 

 thanx for any help you provide sir. i will be happy if you just recommend me which VI is better to modify it and work on it??

  and is it my idea is k ? and can you plz show me how we can test it using NI-SPY and how i can make it 2 byte ??coz i am still dnt know how ??

 

 

THANK YOU VERY MUCH SIR 

0 Kudos
Message 43 of 58
(2,529 Views)

sending 2 bytes is easy.

The easiest way is using a byte array (array of u8) and convert that to a string.

 

see the block diagram  of the attached vi

greetings from the Netherlands
0 Kudos
Message 44 of 58
(2,522 Views)

hi Albert Geven 

good day for you sir. thanx for the explanation and the posted VI, but where i can place this in my VI the second one i attached ?? 

 

thanx for reply. 

0 Kudos
Message 45 of 58
(2,513 Views)
This is all confusing to me. Is the VI you posted supposed to be sending this ECG signal at some point? If not, what is? Another LabVIEW program? The VI you posted is perfectly capable of sending messages of any length. My guess is that this is not your code.
0 Kudos
Message 46 of 58
(2,506 Views)

hi Dennis Knutson

 i will upload two vi's, the first one i design be my self on the other hand the second i did some modifications for it. my idea was to ACQUIRE the ECG signal not to send it sir, and i am using labVIEW to apply this application, that's why i am working on building the sensor  now days dealing with the NI-usb 6008 12bit to check if my work is k or i have a problem with . the sensor job will send the ECG using bluetooth module and there should be PIC programing to organize the data, and i am still wanna know how i have to deal with labVIEW at least when i finish the first part i will be in safe side sir.

 

thank you for the comments  

 

Hints:

serial port with bt (i did)

ECG com PORT & Configure Serial Port (modified) 

0 Kudos
Message 47 of 58
(2,501 Views)

HI

 

If you really are using the 6008, where do yuou have the blue tooth connection?

This 6008 is connected via usb directly.

greetings from the Netherlands
0 Kudos
Message 48 of 58
(2,497 Views)

If you are acquiring the ECG signal with LabVIEW and the bluetooth module, then I don't understand your question about sending multiple bytes. That would be done in the ECG sensor/hardware part. When you get around to that, I would recomend that you append a termination charcter after the second byte and possibly even a start character. You are going to have to send multiple bytes if you are using a 12 bit acquisition device and you will need to know the byte order when receiving. If you have a termination character, you can set the VISA read to terminate on a specific character and you would just request 2 bytes every time. Discard the first read since you will not know if that is complete.

 

 

0 Kudos
Message 49 of 58
(2,495 Views)

 Albert Geven  

 

no i am not using the DAQ with my bluetooth, i am using it to test if my ECG sensor can work or not coz its 12bit, so i can consider the DAQ as an ADC to digitize the signal so i will place the DAQass and will connect a graph as an indicator. but the PIC i will use is 8bit or 10bit, that's why am willing to know the difference. and i am still wondaring if i can set the port and pari the module using bluesoleil is that enough to talk with VISA ? 

 

Dennis Knutson 

 

 thank you very much for your advice, so by that i have to keep modifying the second VI until i can get the ECG signal ?? i found a way called NI-SPY and i dnt know how i can test my port using this tool ? is what the article mentions, i have to save the data in a file then i can do the capture ?? my project is REAL TIME means i cant save the data then close the file then call it again using the NI-SPAY, so is it anyway can i test plzzz 

 

thanx for any help you guys  can effort.

 

Regard's  

0 Kudos
Message 50 of 58
(2,490 Views)