キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

cDACMx Error

解決済み
解決策を見る

Hi

 

I have this subVI that is suppose to output signals to my cDAC.

SubVI blcok diagram.PNG

 

Output_Waveform.vi block diagram

SubVi Inputs.PNG

 

As the above block diagram shows at the end of each loop, I get a pop up message to continue or stop.

 

The problem I have is that after the first loop, I get the pop up message and if I press 'continue', I get the following error message:

Error Msg.PNG

 

I do not understand why the task I have passed to the subVI is not being recognised for the second loop.

 

Where did I go wrong?

0 件の賞賛
メッセージ1/6
3,505件の閲覧回数

Hi sherzaad,

 


@sherzaad wrote:

Where did I go wrong?


It's not a good idea (aka: it's a very bad idea) to delete DAQmx tasks in your loop, but still want to use the DAQmx task reference in the next iteration…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ2/6
3,497件の閲覧回数

@GerdW wrote:

Hi sherzaad,

 


@sherzaad wrote:

Where did I go wrong?


It's not a good idea (aka: it's a very bad idea) to delete DAQmx tasks in your loop, but still want to use the DAQmx task reference in the next iteration…


sherzaad_0-1583416855527.png so if I understood you correctly, then deleting this block should solve my issue, right?

 

 

0 件の賞賛
メッセージ3/6
3,467件の閲覧回数
解決策
トピック作成者sherzaadが受理

Hi sherzaad,

 


@sherzaad wrote:


so if I understood you correctly, then deleting this block should solve my issue, right?

Don't delete the DAQmxClear function, but move it after the loop.

You also should move the DAQmxTiming function before the loop. You also don't need to wire the N input of the FOR loop.

 

(Hint: Use MatrixSize instead of ArraySize when you need the number of rows/columns as separate wires…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 件の賞賛
メッセージ4/6
3,462件の閲覧回数
解決策
トピック作成者sherzaadが受理

I would have placed a DAQmx Stop where you had previously placed DAQmx Clear.  (Although I'm actually not 100% sure it'll be necessary for a Finite Sampling task which might automatically revert to stopped state when you "wait until done".)   The task ref remains valid and suitable for reuse after a Stop but not after a Clear.

 

I also agree with all the points GerdW already made.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 件の賞賛
メッセージ5/6
3,447件の閲覧回数

@Kevin_Price wrote:

I would have placed a DAQmx Stop where you had previously placed DAQmx Clear.  (Although I'm actually not 100% sure it'll be necessary for a Finite Sampling task which might automatically revert to stopped state when you "wait until done".)   The task ref remains valid and suitable for reuse after a Stop but not after a Clear.

 

I also agree with all the points GerdW already made.

 

 

-Kevin P


 

Yeah... I realised (better later than never!) that I should inlcude the DAQmx Stop block. 

 

All working fine now.

 

Thanks @GerdW and yourself! 

0 件の賞賛
メッセージ6/6
3,416件の閲覧回数