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.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni Switch Init With Options Problem

Greetings,

 

I am using the NI-SWITCH libraries to initialize a PXI-2527 MUX. In MAX it is configured for a "2527/2-Wire Dual 16x1 Mux". I want to use the initwith options command to configure the MUX to a "2527/2-Wire 32x1 Mux".

 

I have tried several driver setup strings and varations and nothing seems to work. 

 

I am using NI-SWITCH v4.6.5 2013 and I can't update a the version due to baseline SW constraints.

 

My current driver setup string looks like this:

 

"DriverSetup=topology:2527/2-Wire 32x1 Mux"

 

See the attached TPS SEQ file.

 

Can any one give me hand?

 

Thanks

 

Minesh

0 Kudos
Message 1 of 7
(4,479 Views)

How do you know it isn't working?

 

My guess is that it doesn't actually change it in MAX but just changes the run-time object.  I'm not a switch guru but that would be my guess.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 7
(4,424 Views)

Hi Jigg,

 

I received a negative error codes back on the init with options. I need a valid Switch handle in order to query the error for an explantion. But since the init calls errors out, no valid handle.

 

Minesh

0 Kudos
Message 3 of 7
(4,420 Views)

I don't see the issue using your sequence file.  Then again I have a different version of NI Switch installed.  I did have to change the IDQuery and resetDevice to VI_FALSE though.  I also had to change the resourceName to be my resource (which is a simulated switch card).

 

Why do you  need a valid switch handle?  doesn't the documenation for NI Switch somewhere show you what the error code means?  Which one is it?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(4,401 Views)

Here is an image of my settings.  And it seemed to work fine.  I just ran the single step so Locals.Session was 0.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 7
(4,400 Views)

Hi Jigg.

 

Thanks for the information. Can you resend the JPG picture but with the driver setup string expanded out?

 

with respect to the handle, the error query API for the switch requires the returned handle from the init API. I did try to set the driver string after a normal init (without options) and returned an error code, which when decoded, told me that the driver setup attribute was read only.

 

Thanks

Minesh

0 Kudos
Message 6 of 7
(4,323 Views)

Here it is.

 

I didn't use the normal init.  I didn't need to call any other steps.  Just the InitWithOptions and the Close.  I didn't verify that it actually changed to topology but I didn't get any errors.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 7
(4,312 Views)