Discussion:
HS-DIO 6552 Questions
(too old to reply)
Jakeus
2007-05-03 19:40:11 UTC
Permalink
I'm trying to come up with different approaches to a couple problems I've run into.  Any feedback would be great.
 
1)  Say I have a burst "A" of 100 samples.  I want to loop samples 30-60.  Is there any way I can do this?  The only solution I've come up with is separating the burst into "A","B",and "C".  Where A is samples 0-29, B is 30-60, and C is 60-99.  Then use scripting to generate A, loop B, then generate C.
 
2)  Say I have 5 HS-DIO cards on my PXI chassis.  Is there any way to burst an 80 channel HWS file (created using the NI HWS API) across the PXI chassis?
 
3)  In scripting, there are repeat #, repeat until, and repeat forever.  Is there anything such as "repeat 100 until scriptTrigger0".  I want to loop 100 times, but if I see the scriptTrigger, I want to exit the loop.
 
4)  If a failure occurs, I can see what sample failed.  Is there any way to determine exactly what pin failed during that sample?
 
5)  What is the maximum number of triggers I can use during scripted mode?  Just the 4 scriptTriggers?
Ryan M
2007-05-03 22:40:16 UTC
Permalink
<a href="../view_profile?user.id=78752" target="top" class="auth_text" style="font-weight: bold;"> Jakeus</a>, Thanks for the post.The 6552 supports the scripting engine common to all SMC based generation devices.&nbsp; One feature of scriptting is that it allows you to not only link, loop, branch, etc but it allows you to generate subsamples of a downloaded waveform.&nbsp; If you open up the script editor from Start&gt;&gt;Programs&gt;&gt;National instruments&gt;&gt;NI-HSDIO there is an NI Script Editor utility that lets you interactively build up a script.&nbsp; When you click on the "Generate Instruction" function, you can tell it to generate a subset of a waveform.&nbsp; You provide it the starting sample position and the length and the the SMC will do the rest for you.&nbsp; See below for an example.For multi board applications, you will need to split out the HWS waveform into board boundaries and download them individually to each device.Scrippting does not support a break statement that could be used to break out of a finite loop.&nbsp; You could nest a conditional that looks for a level script trigger.&nbsp; It may look something like:script myScriptrepeat 100if scriptTrigger0else&nbsp;&nbsp;&nbsp; Generate MyWaveform subset(30, 80)end ifend repeatend scriptIn this fashion, the loop will run 100 times but only generate if the level of the scriptTrigger permits it.&nbsp; This won't work with a level based script trigger though unless you could generate an edge for every iteration you want to skip.4)&nbsp; I assume you are talking about Hardware compare mode?&nbsp; In this mode you can store only failures which includes information about what sample failed and on what line so you can extract all of the information you need.&nbsp; The latest version of the HSDIO driver has examples using HWC mode that illustrates how to extract that information.&nbsp; Specifically, I would recommend looking at "Hardware Compare - Error Locations.vi".&nbsp; Using the "niHSDIO HWC Fetch Sample Errors function, you can fetch the number of errors, the samples with errors, and the mask of the bits that were error.&nbsp; There is also an option to retrieve how many times in a row that specific error occured.5)&nbsp; You have access to up to 4 script triggers at a time.&nbsp; However, that does not proclude you from using start or pause triggers for data flow control.&nbsp; A complete list of triggers can be found on page 19 in the NI 655X specifications underHope that helps!
Message Edited by Ryan M on 05-03-2007 05:18 PM

Loading...