LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"generate subset" in script gives error if even number

I am try to generate with a scipt using a PXI6551.  In the generate subset command if it is a EVEN number such as below (gree) subset(0,17) it gives the error below (red).  If it is an ODD number it works.  Is this a bug, normally you would need an even number of samples to be able to generate but with the script it seems to give the error if there is an even number?
 
Thanks,
Brian
 
script myScript
   repeat 1
      Generate PRBS
   end repeat
   Generate PRBS subset(0,17) <-gives error   (0,18) does not give error
script
 
Error -1074115617 occurred at niHSDIO Write Script.vi
 
Possible reason(s):
Driver Status:  (Hex 0xBFFA4BDF) DAQmx Error -200032 occurred:
Subset length specified is not valid.
Change the subset length to be longer than zero samples and a multiple of the alignment quantum.
Line Number: 5
Position in Line: 18
Subset Length: 17
Alignment Quantum: 2
Status Code: -200032

Message Edited by BrianPack on 09-29-2005 04:29 PM

0 Kudos
Message 1 of 5
(2,525 Views)

Hello Brian,

The command Generate PRBS subset (0,17) would give an error because you are specifying an ODD number of samples (17). However when using the (0,18) you use an EVEN number of samples (18). Please let me know if I am missing something here.

Ayman K

0 Kudos
Message 2 of 5
(2,497 Views)
Correct me if I am wrong if you generate samples 0,17 that is 18 samples.  1,17 would be 17 samples.  That is why I dont understand why it is giving an error when really (0,17) is an even number of samples.?
0 Kudos
Message 3 of 5
(2,481 Views)

Brian,

The format (x,y) means y samples starting at position X and therefore when you specify (0,17) you would still generate 17 samples but starting at position 0. Whereas when specifying (1,17) you would generate STILL 17 samples but starting at position 1.  Therefore, in either case, you are still asking to generate an odd number of samples. Hope this helps.

Ayman K

0 Kudos
Message 4 of 5
(2,476 Views)

ahh...thanks that helps a lot.

Brian

Message Edited by BrianPack on 10-03-2005 09:52 AM

0 Kudos
Message 5 of 5
(2,472 Views)