LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what all sofware is required to develop a userinterface.vi to read data from a data logger and save in a file

hi,
i am working on creating a GUI.vi to read data from the datalogger and the same should be used to set the date ,time,etc.i am thinking of using VISA to read data through serial port(COM1),that interface is available.but when i tried to read data from the logger i am getting timeout error.what should i do ?i am using the example given with labview 7.0 .can any one suggest me what all things i need to do if i want to read datalogger to a file.Is there any one who workrd on this.please reply me as early as possible,
bye
vbkraju
0 Kudos
Message 1 of 8
(3,396 Views)
Hi Vbkraju,

It is hard to say what the timeout error is from without more information. Which example are you using? Basic Serial Write and Read.vi? Or a different one? Also, what type of instrument are you reading talking to, what command are you sending to it, and what do you expect to get back?

Have you tried communicating with the instrument through a different method, such as through opening a VISA session through Measurement and Automation Explorer? With a little more information, I believe we will be able to help you receive your information through the serial port.

JohnM
0 Kudos
Message 2 of 8
(3,396 Views)
hi JohnM,
thanks for your reply.
i not that much experienced in LABVIEW (7.0).
the main idea is to read and write from the datalogger and draw the graph of the readings read from the datalogger.the datalogger which i am using is from spectrum 4000.i am using serial serial.vi .i am not using any other commands.the datalogger reads the various voltage levels depending on the sample interval set.these values are stored in it.
i would like to read them.i haven't tried any other method.if you want any other details please infom me.
so please help me in reading the datalogger throug serial port.
0 Kudos
Message 3 of 8
(3,396 Views)
You're welcome--I'm happy to help.

The LabVIEW <-> Serial.vi is a good example that allows for writing commands to an instrument and reading back from it using a VISA Session. One of the inputs on this VI is the Resource Name. You need to ensure that the name of your serial port is in this drop down menu, so that the program is sending and receiving data from the correct place.

The VI is setup so that you can send a command to the external device, and then receive data back. I am not sure about the Spectrum 4000, but most devices have commands that they receive to tell the device which data to send back over the serial port. The VI has a default string to write of *IDN?, which is a common command that tells the instrument to return an ident
ity string. The fact that the program is timing out for you indicates that the program never received any data from the device. Either the device is not configured to automatically send data, or the correct command is not being sent to the device. Your datalogger manual may be able to help you determine what serial commands it needs to receive to send the data out you expect.

I hope this will get you further along in your application.

John M
0 Kudos
Message 4 of 8
(3,396 Views)
thanks alot for your help.
i am having the API for the logger which i am using.since i have the API,is it necessary to use the VISA now ? how can i use the routines available in API to coordinate with LABVIEW .for example ,if i have a userinterface.vi in LABVIEW with menu which contains 'read datalogger'option .if i click that i should get that command executed.so what all i have to do to make my work as explained above or if any other method is available means please tel me.
vbk_raju
0 Kudos
Message 5 of 8
(3,397 Views)

If you would prefer to use the API for your device, then no, there is no need to use VISA. You can call the same functions from LabVIEW that the API calls using a Call Library Function Node. This is basically an item on the block diagram that calls a function from a dynamic link library, or dll, and allows you to pass in the appropriate parameters and get the return value back. Here is a great document from that National Instruments website about how to use these nodes:

An Overview of Accessing DLLs or Shared Libraries from LabVIEW

Hope this helps!

John M

0 Kudos
Message 6 of 8
(3,396 Views)
hi,
i am building the user interface.vi in that i have developed a runtime menu .now i if i have an option in runtime menu as Readlogger .now once i select the option i should be able to read the logger.ihave used library call function to access the API available and i am getting the required from the API function available.i want the same message to be displayed as popup menu once i select the particular option i should get this displayed.my problem is how should i connect menuselection to the library function call ,or is there any other way to do this .if any details required ,please ask me .thanks alot.
bharat
0 Kudos
Message 7 of 8
(3,387 Views)
Hi Bharat,

What kind of control are you using to allow the user to select the function? For most controls, you can make use of the property node to get the user's selection as an input for your API. You can create Property Nodes by right-clicking the front panel object or its block diagram terminal and select create»Property Node from the shortcut menu. This will create a Property Node on the block diagram that is implicitly linked to the object on the front panel.
You can get the message to pop up using the "One Button Dialog" function found in the "Time and Dialog" subpalette.
0 Kudos
Message 8 of 8
(3,366 Views)