Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Communication

Hello!

First of all I am sorry if my english it´s not really well.

I have a similar problem and maybe somebody can help me. Please.

I need to read from rs232 (com1) but character to character, my baud rate is 1200, 1 start bit, 7 data bit, parity even, 2 stop bit, and none control. It means that the time of one character is 9,16 ms (time of 11 bits), and the end character of a instruction can be diferent depending of the kind of information sent.

My real problem is that I need to read 4 especial (hex 7f 7f 1113)characters and just after I need to send my information.

I had been doing probes with while timed loop each 10ms or 9 ms and connecting one buffer of one character but I have concluded that is not posible read each character and compare with another and just send my data.

My question is how can I read character by character at real time? and transmit just inmediately after.

 
Message 41 of 47
(2,515 Views)
 
You can do this very simply.
Wire a False constant to 'Enable Termination Character' input of 'Configure Port.vi' where you give Baud Rate, Data Bits and all that.
Doing this you can recieve all the data that has been by the instrument through the RS232 port.
From the recieved data search for your particular data ie, "7f 7f 1113" if it exists or not, in the data recieved, you can decide what ever you wanna do.
If you are giving the string to be searched in this Hex format, the data recieving from the instrument should be taken in Hex format in your computer.
You dont need to have any timed loop for this. The communication itself will take some time (in ms) i think.
For comparing each value in the data set you have to recieve all the data as a set, by disabling EOF.
Then you have to sort each data out of it to compare between them.
 
Anyway this is not the way to find the solution for your problem.
You can start a new message through this link
 
Smiley Happy

Message Edited by PIPL on 02-15-2007 10:21 AM

Using LabVIEW 8.0, 8.0.1, 8.2
0 Kudos
Message 42 of 47
(2,493 Views)

Dear Friends,

 I am new user Of NI  LABVIEW 8.6 software and i need help in establishing a serial(RS232) comm with PC,presently I have been assigned a job to establish a communication between a Dynamic Torque measuring system ( Binsfeld Engg)output signal in to a PC Based data acquistion system. The System gives an output of + 10VDC corresponding to the torque present in the shaft , the output can be tapped either via two way connectorin form of voltage or directly via it's RS232 Port.The equipment manufacturer does not provides any driver software since they say it can be done easily in lab view.

Further The details as mentioned in the Equipment manufacturer manual is attached with this mail.

 

 

Pls help me.it's very urgent.

Waiting for reply.

Pls help me.

 

0 Kudos
Message 43 of 47
(2,156 Views)
Well, first of all, you don't mention exactly what kind of help you need. Have you tried any of the shipping examples? Have you tried something as basic as using Hyperterminal to verify your com settings and cable? That's almost always the first thing I do. Once you've done that, reading the instrument should be not much more than a VISA Read inside a while loop. Set it to read 4 bytes and convert the string to a numeric per the formula in the manual.
0 Kudos
Message 44 of 47
(2,154 Views)

Hi ,

Welcome to NI community .

I went through the Spec Sheet which you gave but i did not get the company and model number .

Please try locating an instrument driver for the same at

www.ni.com/idnet first . If you cannot find an instrument driver there you could build one of your own from Instrument Driver Project which you can take through

templates .

The basic level of communciation can be done thorugh Visa Serial Read Write itself which you will find in the examples of LabVIEW

Please provide us with your inputs for the above users so that we can provide you with more information .

 

Thanks and Regards ,

Pranchal Srivastava

National Instruments

0 Kudos
Message 45 of 47
(2,136 Views)

I know the question a few posts up from Rahul was from several years ago, but I ran into this same application, reading the digital streaming data from a Binsfeld TT10K.  Rahul's post was the only thing I could find on the web and it took me some time to figure it out, mainly the data decoding.  Hopefully this will help someone in the future. 

 

For reference:

The entire manual for the Binsfeld TT10K system is here:

The digital streaming protocol part from the manual is here

 

Attached is some example code written in LV 10 and also an image of the same code.

0 Kudos
Message 46 of 47
(1,530 Views)

Dear All,

 

Hello, i am new to LabView and practically dumb to this kind of high-level programming. I have the same problem as Rahul of about 4 years ago (trying to couple Binsfeld's TT10k to my PC using LV2013). I wish to use my TT10k ASAP for some  torque-thrust measurements making this situation even more furstrating. The parameters of the device are somewhat known from previous posts. So, I would like to know if there is any step-by-step guide to create a driver for the TT10k, making it "readable" ("findable? ", "discoverable?") thus enabling me to use it with LV and finally recording some measurements?

 

I 'm in a difficult situation here, so any prompt and quick reply would be most appreciated.

Thanks in Advance!

 

0 Kudos
Message 47 of 47
(1,368 Views)