DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

rs 232 input

Hi all,

Hopefully a simple question for anyone who has already done this or has more experience with rs 232 communication settings than me Smiley Wink

I have a flow meter that outputs pulses to an RS 232 port according to the flow going through it. it is a simple paddle with all clear fins except for one that is black and breaks the light beam hence sends a pulse.

I want to be able to "read" these pulses in to dasylab and then essentially have a counter and calculate the flow from there.

I have used the rs 232 connection with other devices but they have all sent ascii strings etc that are easy to read in to dasylab.

I havent been able to find anything to read a continuous feed of pulses (bits) from a device yet, all the functions I have found so far are involving strings, bytes etc and have a finite length.

Is there any function/ setting that will enable me to do this - so once it is read in to dasylab the data will be same/ similar to running the sequence/ pulse generator within dasylab.

Any assistance is greatly appreciated.

Regards
Glenn
0 Kudos
Message 1 of 5
(8,740 Views)
Hi Glenn,
 
It sounds like you have a DB-9 connection on this device. This type of connector is used for serial communication as well as CAN communication, so it is not necessarily utilizing the RS232 communication protocol. If it only returns pulses as each fin passes, you will not want to use RS232 protocol to communicate with it. The RS232 protocol(as well as the other serial protocols) have a structure to the data that comes to the port which includes start and stop bits as will as the data. Here is a link to a tutorial about the serial protocols. I would instead suggest a counter to measure the frequency of the signal. If I am completely understanding your system this would be the best way to measure this type of signal.
 
 

Regards
Krista S.
Applications Engineering
National Instruments
Message 2 of 5
(8,724 Views)
Thanks Krista for your reply,

You have hit the nail on the head it is exactly what I have a DB-9 connector and the device puts out pulses according to the flow, therefore a counter etc would be ideal.

My problem is how do I read from  the serial port the pulses and get them in to Dasylab, is there any module that will do this automatically then run that in to a counter etc to manipulate to what I require, if not any other ideas??

From what I have found in Dasylab the only way of communicating with the serial port is via the RS-232 module which requires the rs-232 standard - which isn't appropriate for my application.


Essentially if I can get the "pulses" into Dasylab then from there will be just a little manipulation ie counters within Dasylab to obtain the readout I require.

thankyou to you all in advance for your assistance it is really appreciated
 
Regards
Glenn
0 Kudos
Message 3 of 5
(8,716 Views)
Glenn,

DASYLab's RS232 Input module is exactly that. It uses the Windows serial driver to read from the port. Using the raw pins to input a protocol other than the RS232 protocol would require a separate specialty driver.

On the other hand, the Sound Card driver would allow you to use the parallel port to read Digital IO (your pulses). Maybe you can convert the DB9 connector to a 25 pin parallel port connector?

Otherwise, you'd have to write low level driver code or utilize a program that has such a low level driver.


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
Message 4 of 5
(8,712 Views)
Thanks CJ for your speedy response.


I hadnt thought of using the 25pin port with the sound card driver. a simple adapter shuold solve this problem rather quickly.

Thankyou once again for your help

Regards
Glenn
0 Kudos
Message 5 of 5
(8,710 Views)