LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to simulate a circuit consist of transistors in labview?

Solved!
Go to solution

Hi GerdW,

 

Thank you very much for your reply!

 

When it comes to the data driver, each time will need to write digital data to the 4 pixels of the row opened by the cyclic scan1, is there any example for this kind of situation? I find the example -- "digital continuous output.vi" in the labview, will this example help?

 

Thanks a lot!

 

Jason

0 Kudos
Message 11 of 22
(2,224 Views)

Hi leo,

 

when you want to write digital/boolean signals to a digital output pin(s) then all those DAQmx example VIs with a "digital" in their name may help…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 22
(2,218 Views)

Hi GerdW,

 

Thanks! The examples are very helpful!

 

1. My DAQ device is PCI6221. Now I hope to write 4 serial digital output of 4 bit data each (For example, if I want to send data to the 1st row, I should send data first and then scan1 opens the 1st row), is it possible? Could you tell me how to deal with it?

 

2. The timing sources can be divided into 2 parts: one for scan1 and data and the other for scan2 for measurement. If I use the state machine, how can I make these two timing happen?

 

Thanks a lot! I am very grateful!

 

Best,

Jason

 

 

0 Kudos
Message 13 of 22
(2,212 Views)
Solution
Accepted by topic author leo321

Hi leo,

 

My DAQ device is PCI6221

Your device allows hardware-clocked DIO on port 0, the other pins only allow software-timing.

 

if I want to send data to the 1st row, I should send data first and then scan1 opens the 1st row), is it possible?

Sure.

First send your data on your digital pin dedicated to "data", then set the "open" value on "scan1" pin…

 

2. The timing sources can be divided into 2 parts: one for scan1 and data and the other for scan2 for measurement. If I use the state machine, how can I make these two timing happen?

What kind of "timing sources" are we talking about?

Which timing resolution? Which accuracy? Which clock rates?

(You really need to learn to ask "good" questions, see here or there…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 22
(2,209 Views)

Hi GerdW,

 

Thanks for your advice!

 

1. As you can see in my post 2,

a. scan2 and measurement are used to scan the row I want (I mean I hope to create a button and whenever I click it I will get the results from measurement part through LabVIEW);

b. scan1 should run in a cyclic way;

c. 4 bit digital data should write in the same timing control as scan1; 

d. Data should be changeable according to demands.

2. As PCI6221 got no onboard timing engine, I am trying to use counters as the timing control. For now, I got no demands on how fast or slow the scan1 should run, I hope to design the prototype of controlling and testing first.

 

Thanks again~

 

Best,

Jason

 

微信截图_20180619152910.png

0 Kudos
Message 15 of 22
(2,205 Views)

Hi leo,

 

1a: use a state machine - or maybe a QMH driven by an event structure handling your buttons.

1b: use a loop or hardware timing

1c: do you want to output your 4 bits using 4 DO lines or just one analog output?

1d: that's the case most of the times…

2: The PCI6221 has an "onboard timing engine" as it allows hardware-timed AI and DIO!

 

Your image is quite nice, but it does not explain your "timing" issues…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 22
(2,210 Views)

Hi GerdW,

 

You are really helpful and I learn a lot from you.

 

1. The attached picture is the timing analysis I want to create through the controlling and testing system. But I am still confused about how to program the whole picture as a system.

Could you please show me how you would program in LabVIEW to make the scanning and controlling system? 

 

2. For 1c, I want to output 4 bits using 4 DO lines.

 

Best,

Jason

 

微信截图_20180620153954.png

0 Kudos
Message 17 of 22
(2,203 Views)

Hi leo,

 

The attached picture is the timing analysis I want to create

That's what I was asking for!

I have to admit I'm not an expert in those DAQmx counter abilities and routing of signals, there are other forum members more proficient in - maybe they will add their thoughts on your problem.

 

Please also provide information about

- the desired clock rate

- do you want to output the clock signal too?

 

(I would tackle this problem using a cRIO and implementing all that timing requirements in the FPGA…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 22
(2,189 Views)

Hi GerdW,

 

Thanks! 

 

1. For now, I am not very sure about the clock rate, but the max rate of PCI6221 is 250 kS/s should be enough. We can assume one first.

2. No, I don't need the output of clock signal.

It's great you would spare some time for it! I look forward to your code very much, but I only got PCI6221, I don't know whether it's enough for the whole function. Do you know any examples or posts more or less the same as mine?

 

Best,

Jason

0 Kudos
Message 19 of 22
(2,185 Views)

Dear NI family,

 

I am new with LabVIEW.

 

Could you please guide me on how to output 4 bit of serial digital data through 4 DOs into the DAQ and outside hardware?

 

Are there any examples? How to code for this demand? How can I control the speed of output?

 

Thanks a lot!

 

Best,

Jason

0 Kudos
Message 20 of 22
(2,176 Views)