Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Data from Datalogger using COM1 (VISA)

First of all,I am new to LABVIEW Development .I am trying to read data from DATALOGGER using the read example provided in the samples for VISA .the DATALOGGER has a serial cable to connect COM1(COM2).i have connected DATALOGGER using the cable to the COM1 and i tried to run the program available .but the output was an error.the error was timeout error(BFFF0015).so what should i do ?do i have to configure any thing to get it right?can we read any DATALOGGER using this VISA?In case any one having documents regarding this please send me.thanks for your reply .
0 Kudos
Message 1 of 4
(4,197 Views)
What is the manufacturer of your datalogger and the model number? What is the actual name of the VI that you're trying to run? Are you just doing a VISA Read or Write? What are the commands? VISA can be used to communicate with serial, gpib, vxi, usb, etc. instruments but serial is the hardest for beginners to setup. You need to have the correct com parameters (baud rate, parity, stop bits, etc.), the right type of cable, and send the correct commands with the proper termination character and format. What I recomend to all is to first get communication going in a program such as hyperterminal. Once you've done that, you know the cable is correct, the communication parameters, and the command syntax. Then you can go ahead and write your own program usi
ng VISA.

There's a lot of information available on serial and VISA. There's appendix A of the LabVIEW Measurements Manual (Help>Search the LabVIEW Bookshelf) and
Message 2 of 4
(4,197 Views)
hi Dennis,
thanks for your reply.
i am using Spectrum DataLogger 4000 .
i am using the example serial.vi from the serial port provided with the LABVIEW EXPRESS 7.0 .i am using just the VISA read and write.no other commands i am using.if you rquire any other information ,i can provide you.
withregards,
bharat
0 Kudos
Message 3 of 4
(4,197 Views)
And do you have communication working with Hyperterminal? If the answer is no, then either the cable or communication settings are incorrect. Your user manual should explain both. If the answer is yes, then I would suspect that you are not sending a termination character with your write string. A termination character at the end of a command tells the instrument to go ahead and start processing the command you just sent. Termination characters are often a carriage return or line feed control character. Your manual should tell you which one the instrument requires. The example you're using doesn't send any. One way you can do this is to right click on the write string control and select '\' Codes Display. This will allow you to ente
r control codes at the end of your command string. The code for a carriage return is a \r and the control code for a line feed is a \n. Another way to get a control code at the end of your command is to modify the diagram. Insert a concantenate string function into the write string before the input to VISA Write and connect a constant from the string palette. I've attached a picutre showing what I mean with a line feed constant.
0 Kudos
Message 4 of 4
(4,197 Views)