Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Writting a program in Labview for USB-9472

Daer All,

I am wondering if one helps me.

I just bought NI USB-9472 to connect my program to a normally closed relay. Before connecting relay, I have to generate a signal  (unde a condition which is in my program) in my program. I read some discussions but I am still confused. and almost all of the used a loop for DAQ assistant

I started with DAQ Assistant and put it on my program. the progrem is working in a while loop and continuously generates data. I have not connected the relay to USb 9472 to see my program is working well or not. whenever I click  "run " "continuous sample in DAQ Assistan, DAQ Assistan Error will pop up. (Error -200077 occurred at DAQ Assistant
)

Should I put the DAQ Assistan in another while loop?

Could one help me how to get a signal for USB-9472

Regards,

Mehdi

Message Edited by Neka on 02-23-2009 11:51 AM
0 Kudos
Message 1 of 6
(4,067 Views)

Hi Neka,

           I'm wondering if you could please post the full text of the error message you're getting, is it an error similar to the one listed in this KB?

Also, a good place to start would be to try running the example program Write Dig Chan.vi.  This can be found by going to Help»Find Examples»Browse»Hardware Input and Output»DAQmx»Digital Generation.  Though they don't use a DAQ assistant in this example, you'll be able to try it out, make sure you don't get errors, and see anothe way of accomplishing this.  Please let me know about that error, and have a good day!

aNItaB

Applications Engineer

National Instruments

0 Kudos
Message 2 of 6
(4,048 Views)

Hi ,

Thanks.

here is the error:

Error -200077 occurred at DAQ Assistant
Possible Reason(s):
Measurements: Requested value is not a supported value for this property.
Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand

 

Please let me explain again what I am trying to do:

basically I want to control a circuit with a reraly based on temperature data which I am reading from my system.

I wrote a program in Labview and analyzed temperature data and calculated first derivative of temperature data.

I put a condition on the program is that as soon as first derivative reaches to a specific amount I want a signal goes to the relay through DAQ assistant.

I think the output after contional diagram is just a fasle or true output. I have to convert this on or off out put to a signal by DAQ assistant.

After talking to NI experts they recommended me USB-9472 to send signal to relay.

Now I have USB-9472, but the problem is that I dont know how to figure out this part in my program.

I added DAQ in the program right after that conditon.

My whole program is working in a while loop.

Do I need a seperate while loop for DAQ assistant?

 Do I have to put DAQ out side of the while loop and biult a seperate while loop for DAQ?

Do I have to write a subVI and start DAQ on that program?

I am wondering if one helps me.

Regards,

Mehdi

0 Kudos
Message 3 of 6
(4,041 Views)
What you have in the DAQ Assistant that you posted is 1 Sample (On Demand). If you change that to Continuous Samples, then of course you will get that error because the board does not support anything other than software timed digital I/O. Leave the DAQ Assistant in 1 Sample mode and the error will go away.
0 Kudos
Message 4 of 6
(4,036 Views)

Thanks,

I changed it to 1 samle on demand, there is no error.

I have not connect relay to the USB-terminal, how can be assure that usb will send a signal to relay whenever the condition satisfied?

I mean, can I see the signal which is going to the USB on a graph?

what will be the specification of signal?

0 Kudos
Message 5 of 6
(4,033 Views)
The 'signal' is nothing more than a True or False from your Boolean. Wire it up to a Boolean indicator or if you want a history, the digital waveform graph. If you want a chart, just convert the Boolean to a 0/1 and plot that.
0 Kudos
Message 6 of 6
(4,025 Views)