Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with repeat forever scriptTrigger0

Hi Aaron,

1.  I received error "waveform length is too small for the "Generate" instruction before "If-Else" block," if the default waveform length is 2.  It said the minimum is 6.

2.  Using wait unti scripttrigger should be OK. I have another application using  that.  However, i need to repeat the following 

 

http://forums.ni.com/ni/board/message?board.id=70&message.id=5200&query.id=60328#M5200

 

which I need to select different waveform output by using different scripttrigger.  I tried the suggestion and had problem.  Then I removed the code bit by bit.  Finally, it comes down to the simplest repeat forever loop having problem.

 

 

0 Kudos
Message 11 of 17
(1,661 Views)

kkwong,

 

It is strange that you would receive the error of "waveform length is to small..." because in the detailed specifications for the 655X the generation minimum waveform size for a finite waveform is 2 samples. 

 

I was able to look at the other forum post and see exactly what you were referencing, how many waveforms do you need for this application and how many script triggers are you using? You are using a SW trigger but have you tried to use a Hardware trigger? 

 

You might also try to increase the clock rate for your program and also increase the # of samples so that you would generate the same waveform for the same duration just allowing more clock cycles to occur as you are outputting data. 

 

Also what version of the driver are you using? Have you tried running any of the examples that come with the driver and see if those run correctly? 

 

If the issue still remains after doing the suggestions then I would ask you to post your code so we can try it on some of our hardware. If you could make the example very simple so that we can run it right away and see if we can replicate the behavior. Thanks. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 12 of 17
(1,643 Views)

Hi Aaron:

 

>>I was able to look at the other forum post and see exactly what you were referencing, how many waveforms do you need for this application and how many script >> triggers are you using? You are using a SW trigger but have you tried to use a Hardware trigger? 

 

What I wanted to do was repated the forum post. So i used 4 scripttrigger.  I needed to send 8 different waveforms.  I did not try HW trigger. 

 

>>You might also try to increase the clock rate for your program and also increase the # of samples so that you would generate the same waveform for the same >>duration just allowing more clock cycles to occur as you are outputting data. 

Even I try this, that does not fix the original problem.   In my application, I need that clk signal and cannot increase it.

 

>>Also what version of the driver are you using? Have you tried running any of the examples that come with the driver and see if those run correctly? 

 I am not sure the version of the driver.  But the data for the niHSDIO.lib is 6/30/2007 3:49pm.  The DynamicGenerationWithScript.zip file I attached in previous email was the examples that come witht the drivers.  I just modified it so that it use repeat forever loop.

 

>> If the issue still remains after doing the suggestions then I would ask you to post your code so we can try it on some of our hardware. If you could make the >>example very simple so that we can run it right away and see if we can replicate the behavior. Thanks. 

          The DynamicGenerationWithScript.zip file attached previouly should be simple enough for you to try on your hardware.  Please see if you can replicate the behavior.  Thanks!

 

           I think what we need to do is to repeat the problem with your hardware. Once we confirm that it is a problem, then we can try to see how to  get around it.

Message Edited by kkwong on 04-14-2009 09:40 PM
0 Kudos
Message 13 of 17
(1,635 Views)

kkwong,

 

I will try and run the code on our hardware and see if I encounter the same behavior. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 14 of 17
(1,614 Views)

kkwong,

 

I played around with some different code on one of our test systems. I was able to use some script triggers to generate some tones within LabVIEW but did not spend a lot of time with it on the Visual Studio Side. This makes me think that there is something specific in your code that is causing this problem. I apoligize for the long delay in response, but I was curious if you had tried using a HW trigger to see if you can get the appropiate signal that way. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 15 of 17
(1,554 Views)

Hi Aaron,

    I have not used the HW trigger before and need some time to do this.  By the way, can you see the problem under Visual Studio? The code I sent you  a simple modification of NI example.  Do you mean the examples are having problem?  I have been able to repeat the problem under different projects.

0 Kudos
Message 16 of 17
(1,467 Views)

kkwong,

 

I did not run your specific example on our test machine yet. When I try to run your example, as well as the original shipping example, we get an underflow error from the program. I am not sure of the exact reason for this error, but we are working to resolve it so we can run your example specifically and see if there is a bug with the driver. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 17 of 17
(1,445 Views)