11-12-2008 02:33 PM
Yes, the encoder is an external device.
I think the 6009 does not have a counter output pin. You can only read the value of the counter in software. It is not useful for generating timed pulses. Many of the more expensive DAQ devices have counters with Source, Gate and Output pins available.
Lynn
11-15-2008 06:55 AM
Hi Johnsold and others,
I'm writing a code for a file write VI and for some reason I'm having trouble wiring the file path indicator to the open/create/replace VI. It's really wierd and frustrating. Could somebody please help me out here. I've attached the code.
Thanks
11-17-2008 07:50 AM
You need a control, not an indicator. The "file path (use dialog)" input to the Open/Create/Replace File function must be given a value. An indicator only displays the value connected to it. If you hover over the broken wire with the wiring too, a tip will pop up telling you the you do not have a data source connected.
Lynn
11-17-2008 09:50 AM
Mbdeck,
I would recommend that you either leave it unconnected which will use the default value which will pop up a dialog box allowing you to select the file, or right click on the file path terminal and create a control. This should show up as green (the file path type) and will allow you type in or select a file from the front panel. Finally if you always want the same file you might want to create constant.
11-17-2008 08:49 PM
Hello everyone,
Thanks for the replies and suggestions they've been very helpful. I have two other questions:
1) I'm having a hard time designating a file path for the file writer VI below. It doesn't recognize my file path entries on the front panel. I keep getting an error message each time I run the VI. I will appreciate some help in this regard.
2) I'm trying to build a VI that would simultaneously acquire data from a solar cell and a temperature sensor. My question is how to build a VI so that both the solar cell and tempeture data acquisition can be called from one VI. Is this possible?. I don't want to build separate VIs for each. I have a usb-6009 DAQ device. I'll appreciate any suggestions you may have.
Thanks
11-18-2008 08:13 AM
1) Change the settings under Browse Options... on the file path control to "New or Existing." It was set to Existing on the VI you posted. With that setting, it would work only if the file already existed.
When you have an error, please post the error code and associated text. It makes it much easier to try to determine the cause.
2) Just put two (or more) channels in the AI task. Look at the DAQ help files for details.
Lynn
11-18-2008 02:26 PM
Johnsold,
Again thanks for responding. My second question is more about the coding on the block diagram. So after adding two channels in the AI task, all I have to do is put for example my thermometer sub VI in the "For loop" of the "analog input VI" after configuring both channels in one DAQ assistant?.
I will appreciate your comments and suggestions on my approach.
Thanks
11-18-2008 03:51 PM
Mbdeck,
If you put multiple chanels in the AI task you will then get an array of data out in which you will index the array out so that the data pieces will go to their respective code segments.
11-18-2008 04:07 PM
Jason,
Apart from the index array you suggested. Is my approach to writing the code correct?. Do I need to do index array for both the thermometer sub VI and the voltage input VI?.
11-19-2008 03:24 PM
Mbdeck,
I believe your approach is correct post a new copy of your VI again if the current suggestions do not work for you and I will check to make sure you have the right idea.
Yes you will need to index both so as to acquire the correct 1D piece for each of your measurements from the 2D array.