NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using function SwitchFindRoute

Hello,

i am using TestStand an NI SwitchExec. In SwitchExec i defined a lot of routes that are then visible in Teststand and are working without problemens.

Now i tried the function SwitchFindRoute but i get an error and cannot find the problem.

Here is what i am doing.

- In SwitchExec is a Virtual Device called "DEV"

- I created a route MYROUTE from "7001COM" to "7001NO" (this are the ivi-channel-names)

- When connecting the MYROUTE in the switching property of a teststand action then it is working.

- Then i put instead of the MYROUTE the expression:

SwitchFindRoute("DEV","7001COM","7001NO") and run the action but i get an error-popup:

 

An error occured while performing the switch operation "Connect"

for the following device "DEV".

Could not perform the switching operation:

Details The connect route group expression for the step "Action

could not be performed,

Error in call to expression function "SwitchFindRoute".

An error occured while performing the switch operation "Find

Route" for the following device "DEV".

Could not perform the switching operation:

Details: The channel specification string contains invaild characters

or could not be undestood. No match could be found for the given

channel alias name or IVI channel name. Channel:7001COM(error

= -29017)

 

What is wrong?

 

Thanks for help

0 Kudos
Message 1 of 7
(2,458 Views)

Hi OnlyOne,

 

could you please post the statement, that you use in TestStand to connect the routes and the complete MAX configuration or screenshots from the IVI, virtual device and route configuration in MAX?

 

Best regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
Message 2 of 7
(2,440 Views)

Hi Melanie,

what do you need exactly? I think everything is correct in the configuration as my normal routes are working without problems.

 

This is my expression: SwitchFindRoute("DEV","7001COM","7001NO")

The DEV is the virtual device and the two channel names are the displayed IVI channel names from the ivi driver.

 

 

 

 

Download All
0 Kudos
Message 3 of 7
(2,435 Views)

Hi OnlyOne,

 

since the error message points out some invalid characters or an unknown expression, I want to check the configuration in MAX and TestStand.

 

You can configure the route in MAX, as in your second screenshot and read the configuration String from the bottom of the window. I want to compare these two with each other. It is important to take a look even at spaces and special characters there.

 

Both config strings are not shown in the screenshots, but of course you can compare them yourself.

 

Best,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
Message 4 of 7
(2,431 Views)

There is:

 

[DEV_LN/7001COM->DEV_LN/7001NO]

 

where DEV_LN ist the logicalname.

 

Is it possible that i have to use the same string in the FindRoute-function.

So DEV_LN/7001COM instead of only 7001COM?

 

0 Kudos
Message 5 of 7
(2,427 Views)

Or:

what do i have to put in as first parameter?

Currently i put there DEV which is the name of the "NI Switch Executive virtual device" that contains all switches that are configures.

(But DEV is already set in the switching window of the teststep. So perhaps something else is needed here)

 

This is from the manual: SwitchFindRoute("DeviceName", "DeviceChan1", "DeviceChan2".

 

Is DeviceName perhaps the name from the used Device? So when using DeviceChannel= 7001COM then the devicename is "34937A".

But this is configured in DriverSession....

 

 

0 Kudos
Message 6 of 7
(2,424 Views)

Hi,

it is working with the attached settings of switching parameters.

So i really had to add the logical name to the ivi channel names.

Not clear why as the device name is already defined in parameter 1 (DEV) which should know what logical name is used.

Also in the first line of switching settings is also already DEV defined. So why is it needed again in the expression?

It looks not very useful as i dont know all logical names that are defined. When using it i always have to open the MAX to look for the correct names.

Then i think it is faster to use predefined routes / groups.

 

Another thing: How can i read the returned out parameter "capability" of the SwitchFindRoute function?

 

0 Kudos
Message 7 of 7
(2,412 Views)