LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Link digital and analog signal?

Ryan, I think you have nailed it 😃

 

Check out the attached; I have modified it a bit (lower code) to represent what I am doing.

Let me explain what I see this code doing - please inform me if I am wrong.

Simultaneously sampling Torque and Spark (and angle right?) @1,000,000 Hz for 1.2 seconds and

outputing a 1,200,000 element 1-D array of Angles

outputing a 1,200,000 element 2-D array of Torque & Spark which I split into 2 1,200,000 element 1-D arrays of Torque and Spark

 

Now if I examine index #279,000 of Torque, then element #279,000 of Spark and Angle ALL correspond to the exact same place in time???

 

 

Let me know how far off I am this time hehe, LabVIEW sure is fun stuff.

 

Thanks for all of your help!

Ryan

Ryan

LV 7.1
0 Kudos
Message 11 of 20
(1,747 Views)
Ryan,

You got it! Your explanation is exactly right. Glad to hear you are enjoying programming in LabVIEW - good luck with your application.


Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 12 of 20
(1,746 Views)
excellent!  Thanks a ton for the help, I will report back once I give it a try!
Ryan

LV 7.1
0 Kudos
Message 13 of 20
(1,741 Views)
Hey Ryan, I tried it out today and I got an error.  Attached is a screenie of the error.  Any ideas whats going on?
Ryan

LV 7.1
0 Kudos
Message 14 of 20
(1,728 Views)
can anyone tell me where to find a list of error codes and/or what these two errors mean and how to fix them???
Ryan

LV 7.1
0 Kudos
Message 15 of 20
(1,722 Views)
Ryan,

Do you get the error when you are not running in Highlight Execution mode? This mode can be disabled by un-clicking the lightbulb on the toolbar. For future reference, you can get the explanation of any LabVIEW error by clicking on Help->Explain Error. The error on your counter task has to do with not acquiring enough samples in the timeout period, which defaults to 10 seconds. When not in highlight execution mode, how long does it take for your error to occur? The error on your analog input task has to do with a DMA conflict between operations. You can either switch your counter task to use counter 1, or commit the AI task before reading from the counter. Please try switching counters first. If this does not help, or is not an option, I can show you how to commit the AI task. Please let me know what you find.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 16 of 20
(1,715 Views)

Ryan, prior to getting your last response I tried a few things.  I pecked around the develpment zone and found out the issue with counter 0 - so I switched to counter 1.  That helped.  Then I read about the timeout, I switched that to -1. 

 

Now I am getting a new error (the analog tasks are not erroring anymore).  I get error 200141 which from what I can gather seems to be a buffer size problem; any ideas how we can get around this?

 

Thanks for the help

Ryan

LV 7.1
0 Kudos
Message 17 of 20
(1,712 Views)
Ryan, attached is my latest version (I think...I'm at home so I modified an old version I had so that I could post it...I am 99% sure this is what I am using).
Ryan

LV 7.1
0 Kudos
Message 18 of 20
(1,697 Views)
Ryan,

The problem is that the extra bandwidth from your analog input is limiting the rate at which you can read your counter. Here are some specifications on how fast your can read your count register with no other PCI bus bandwidth.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 19 of 20
(1,666 Views)
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 20 of 20
(1,659 Views)