From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Specified property cannot be set while the session is running - 6552

Solved!
Go to solution

I've created a program to run several different scripts.  The first time through execution my program runs flawlessly.  The second time through (without resetting the cards or re-uploading vectors etc.) however it fails.

 

While attempting to run the following command:

niHSDIO_ConfigureDataVoltageCustomLevels(DIO3_acq_session, '11-13,18,19', 1.8, 2.0)

I receive the following error:

"Specified property cannot be set while the session is running.
Set the property prior to initiating the session, or abort the session prior to setting the property."

 

Any suggestions about what could be going on?  Or, any advice for troubleshooting techniques to find out more about the problem?

 

Message 1 of 2
(3,092 Views)
Solution
Accepted by topic author broke

I found my error:

 

Many of my scripts include a list of markers so that records are captured, and I download the captured records later.  Each time that I prepare to run a script that has records I issued the "niHSDIO_ConfigureAcquisitionSize" function to identify the size and quantity of records.

 

However, the first script in my program that I run I do not need records captured, so I wasn't bothering to call the "niHSDIO_ConfigureAcquisitionSize" function.

 

So, the first time through, the card liked the default setting for record count for the first script (in which I don't bother with any captured records), but then the subsequent pass through my test flow the cards didn't like the fact that I had configured it for many more records than it could capture (because of a lack of markers / triggers).

 

This is a little confusing to explain, but I found the problem, so no help is needed.

Message 2 of 2
(3,066 Views)