LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inputs

Solved!
Go to solution
I am currently trying to create an input using an indicator.  However i am having problems connecting it to labview since it is not a DAQ device.  I have tried using the instrument I/O assistant and the measurements and automation explorer with no success.  Any ideas?
0 Kudos
Message 1 of 21
(3,680 Views)
I'm assuming that your "indicator" is a piece of hardware.  We are going to need to know what model it is and how it communicates.  If you have the datasheet for the device you could post either an attachment or a link to a web-site we can find it.

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 21
(3,674 Views)
Yes, It is a Mahr Federal Maxim XL Indicator.  I have it connected through a serial port on it through an adapter to a USB.  Its output according to the data sheet is Serial BCD, 13 digits, 52 bits; ASCII encoded 2400 baud asynchronous stream.  Here are the data sheets i found online http://www.mahr.com/scripts/relocateFile.php?ContentID=6595&NodeID=11586&FileID=6996&ContentDataID=2...
0 Kudos
Message 3 of 21
(3,663 Views)

RossGE wrote:
Yes, It is a Mahr Federal Maxim XL Indicator.  I have it connected through a serial port on it through an adapter to a USB. 

I am assuming you mean a USB <--> Serial adapter. 

 


Its output according to the data sheet is Serial BCD, 13 digits, 52 bits; ASCII encoded 2400 baud asynchronous stream.  Here are the data sheets i found online http://www.mahr.com/scripts/relocateFile.php?ContentID=6595&NodeID=11586&FileID=6996&ContentDataID=2...

 

The first thing you should do is to open up HyperTerminal if you're on Windows or an equivalent serial communication program if you are running a different OS. Set up the communication program for 2400 baud. It doesn't indicate number of stop bits or parity, so assume 8 data bits, 1 stop bit, no parity, and no flow control. See if you have something show up in the communication program. If you don't, then either the communication parameters are not correct, or you have a hardware problem, like a cable issue. Likely cabling issue is whether you need a null modem adapter or not.

 

Do this BEFORE you even think about delving into LabVIEW.  The above exercise will also allow you to see if the device continuously spits out information, or if it requires some sort of "start" trigger. 

Message 4 of 21
(3,647 Views)

I opened hyperterminal and inputted the specifications you advised.  It said that it was connected but, nothing came up in the window.  On the issue of contiuous flow i have an original cord that has a trigger button but, I initially concluded that i would need continuous flow to get the results and connections I needed and therefore part of my adapter cables has a switch for continuous flow.  To check between the trigger cord and the continuous flow I tried them both and the trigger cord wouldn't even connect.

0 Kudos
Message 5 of 21
(3,637 Views)

When said "continuous" I was referring to the device continuously sending a measurement over the serial port. Some instruments (like some DMMs) can continuously send out their measurement over the serial port without being explicitly asked for it.

 

If you cannot get this to work in HyperTerminal then it will never work with LabVIEW. You will need to check whatever other documentation you may have for the device to determine how to hook up the serial interface. If you have no other information then you will need to contact the manufacturer. Don't even mention LabVIEW to them. Just ask them how to connect the device so you can see the measurement(s) over HyperTerminal. 

0 Kudos
Message 6 of 21
(3,627 Views)
did you install the usb-serial adaptor driver?  Most of these adaptors come with software to allow the OS to recognize the device as a com port.  Does the hardware manager see a com port where you attached the adaptor?

"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 21
(3,618 Views)
Yes it continuously sends a signal over the serial port and yes i did load the driver disk to the computer.  I talked to the manufacturer and got the inputs for hyperlink that weren't listed in the documentation sent with the adapter and it still didn't work.  They believe that it is do to a faulty output on the indicator.  Therefore I ordered a new indicator to solve the problem.  Assuming that this indicator can be recieved in hyperlink what would my next step be?
0 Kudos
Message 8 of 21
(3,596 Views)

I'm assuming you mean "HyperTerminal" when you say hyperlink, unless you're using another program called hyperlink? In any event, if you can get it to work with HyperTerminal then you can open the "Basic Serial Write and Read" example that ships with LabVIEW. To replicate how HyperTerminal behaves you basically need a while loop around the read part. In other words, the case structure sorrounding the read gets replaced with a while loop. Since the device continuously send out data, you don't need the write part and you can essentially delete it.

 

You will eventually need to implement looking for the start of the measurement and the end. If the device ends a measurement with a special character, such as a linefeed, then you can configure the  serial port connection to use a termination character and set the termination character to the one the instrument uses. The "Advanced Serial Write and Read" shows you how to configure the serial port to use a termination character to end a read. You can also use this example to start with since that already has a loop around the read. I suspect that the extra serial port parameter line flow control are not relevant to this setup, and you can leave them at the default value.

Message 9 of 21
(3,583 Views)
I have my hardware working in Hyperterminal now and have pulled up the basic serial example but Im having trouble understanding how it works.  Do i need to just copy the example into my program to get the numbers inputted into my code?
0 Kudos
Message 10 of 21
(3,539 Views)