Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 8452 script mode number of bits problem CVI

Hello all,

 

I am using NI 8452 scripting mode to write data to my chip.

 

I have to send my data frames by 32 bits and we know that the device supports up to 64 bits. However, I have got "Function ni845xSpiScriptNumBitsPerSample: (return value == -301719 [0xfffb6569]). NI-845x:  An unknown error has occurred. " error on my CVI code  while I am configuring number of bits per sample for my script.

 

The sequence of my script is as follows:

 

1- create the script

2- enable SPI

3-configure number of bits per sample (where I get the error)

4-configure clock phase, polarity and rate

5-configure chip select polarity (which is active high, that s why we use script)

6- write data

7-disable SPI

8-Run the script 

 

If I skip step 3, my script runs but with 8 bit samples. When I add step 3, it returns the mentioned error.

I also tried the same things with the General Write Script Example.prj of NI examples library and I faced up with the same error.

 

Does anybody have a solution of this problem?

 

Thanks in advance for your help.

 

Sami

Message 1 of 6
(6,605 Views)

Hi samitokgoz,

 

How are you configuring your bits per sample? Are you using samples of 32 or 64 bits? Have you tried with a smaller size?

 

Please let us know.

 

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 2 of 6
(6,538 Views)

Steve,

 

I need to configure my samples to 32 bits.

However I have tried smaller sample sizes and still I got the same error (even if for 8 bits)

 

Thanks,

 

Sami

0 Kudos
Message 3 of 6
(6,522 Views)

Hi samitokgoz,

 

What version of LabVIEW and CVI do you have? Also, what version of drivers for the 845x do you have?

 

Did the program worked before or it has never worked?

 

 

Please let me know,

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 4 of 6
(6,484 Views)

Steve,

 

I use CVI 2010.

I have tried 845x with v2.1 and v2.1.1. Both versions have the same problem.

 

Thanks,

 

Sami 

0 Kudos
Message 5 of 6
(6,477 Views)

Hi samitokgoz,

 

This seems to be a behavior that has been reported so we have a CAR created so we can fix this, I’ll go and find if there is a workaround and I will let you know.

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 6 of 6
(6,393 Views)