10-14-2012 12:33 PM
Hi there,
I am working with testing of transistor,whose gate is controlled by digital output from USB6289,connected with BNC2120.
Test plan:
1.Transistor's gate is activated for 5seconds, with P0.0 for e.g.
2.Then everything remains off for 1seconds.
3.P0.1 is used as digital output to activate the circuit which pass the curent through in reverse direction,P0.1 goes high for 3seconds,PS: Gate is switched off.
4.The same cycle repeats again.
My question is to store values at output of transistor when P0.0 and P0.1 goes high,and those values should not change until my respective digital outputs again go high.
I can access output of transistor by continiously reading my power supply values.
and in on off state I want to read through AI0 because at that time my power supply is off,So that I can activate the circuit to pass current in reverse direction.
Again my question is to acquire the output value through power supply when P0.0 is high and store it until transistor gets switched on again.
and same for P0.1,acquire output value through AI0, when P0.1 is high and store it until it goes high again.
I hope,I am able to explain my problem clearly.
Please help me out.
Regards
Anurag
Solved! Go to Solution.
10-14-2012 09:27 PM - edited 10-14-2012 09:30 PM
@anuvohr wrote:
Hi there,
I am working with testing of transistor,whose gate is controlled by digital output from USB6289,connected with BNC2120.
Test plan:
1.Transistor's gate is activated for 5seconds, with P0.0 for e.g.
2.Then everything remains off for 1seconds.
3.P0.1 is used as digital output to activate the circuit which pass the curent through in reverse direction,P0.1 goes high for 3seconds,PS: Gate is switched off.
4.The same cycle repeats again.
My question is to store values at output of transistor when P0.0 and P0.1 goes high,and those values should not change until my respective digital outputs again go high.
I can access output of transistor by continiously reading my power supply values.
and in on off state I want to read through AI0 because at that time my power supply is off,So that I can activate the circuit to pass current in reverse direction.
Again my question is to acquire the output value through power supply when P0.0 is high and store it until transistor gets switched on again.
and same for P0.1,acquire output value through AI0, when P0.1 is high and store it until it goes high again.
I hope,I am able to explain my problem clearly.
Please help me out.
Regards
Anurag
a simple shift register, boolean logic, a state machine w/timer and daqmx read/write will do what you want....
10-15-2012 02:50 AM - edited 10-15-2012 03:07 AM
Hi Apok,
Thanks for your reply,can you suggest me any literature or demo program for it. I don't have any idea about it.
The thing is I know how to how to take DO and access Analog Input through DAQmx functions. The only problem storing values for those particular instants.
Rest I can access evrything in general,it is working perfectly. The problem is storing those values.
Waiting for your kind reply.
Regards,
Anurag
10-15-2012 05:03 AM
Hi anuvohr,
here you can find some information about Shift Registers, Case Structures and many other LV functions.
http://www.ni.com/white-paper/7466/en
hope this helps.
If you need further information please let us know.
Regards,
Daniel
10-15-2012 08:54 AM - edited 10-15-2012 09:12 AM
think about what states (subject matter:statemachine and Determining When to Use Sequence Structures) you want to happen from t0....t(n-1), whether DAQmx is generating DO outputs and/or AI inputs are being acquired and what needs to happen (timed out event), before you transition to the next "state."
type def an "enum" with your different states:
10-15-2012 07:55 PM
10-16-2012 02:13 AM
Hi Daniel and Apok,
Thanks a lot for your guys. Really helpful links.
I am working on it,I will try to complete it today itself, I will upload it if there are some issues.
@Apok:I will provide timing diagram too.
Regards,
Anurag
10-16-2012 02:35 AM
Hi Anuvohr,
Please let us also know if it works now.
Thank you.
Regards
Daniel
10-16-2012 12:22 PM - edited 10-16-2012 12:31 PM
Hi Daniel and Apok,
Thank you guys for great help,it works the way I want it to work.
Small help: I want to do it for 16 transistors one after another but I don't want to make in one state machine.
How shall i do it?? 16 different state machines with some wait states between them or 16 sequential state machines??
Which method will be good?? Only point It should work one after.
I want it seprate it because if one of the transistor based on some of decisions fails,I will be switching it off permanently.
One more issue How to save all the data for one state machine??
Best Regards,
Anurag
10-16-2012 12:34 PM - edited 10-16-2012 12:50 PM
play around with this....