Findroute (SwitchExecutive 3.00)

Hello

I've updated SwitchExecutive v2.1 v3.00.

I use Findroute() to get the path between 2 points of termination.

I don't want to use the desktop mode but if the user connects 2 times the same points I don't return an error:

Join the 2 Point Point1

Connect the Point1 at Point 2 (same connection, no errors, no reference incremented)

Disconnect the Point 1 and Point 2 (the 2 points are really disconnected)

I use Findroute() to see if the path already exists.

If the path already exists, then return only a warning, if not plug the 2 points.

It worked with SE 2.1 but it doesn't work with SE 3.0:

If I want to connect 2 points via a bus using the AutoComplete feature, Findroute returns the path already exists when I connect the 2 time points.

Directions: [MATRIX_1 / x 213-> MATRIX_1 /-> MATRIX_1 y1 / x 180]

If I want to connect 2 points manually (and a point connects directly to the bus), Findroute returns the path is available when I
connect the dots 2 times (she should return the path already exists).

Directions: [MATRIX_1 / x 213-> MATRIX_1/y1]

Why is there a difference in behavior between the 2 cases with SE 3.0? (He worked with SE 2.1).

Bruno

Thank you John and Sylvie.

I tested your patch and it works (sorry for the delay).

Just a clarification:

RouteSpec buffers dynamically allocated buffers (NISEBuffer *). The FindRoute() function must be called twice.

The first function call returns the value of routeSpecSize and the routeSpec is NULL.

Then dynamically allocate the routeSpec using routeSpecSize.

The second function call returns the routeSpec.

The FindRouteWorkaround must be called twice too.

I modified your function to dynamically allocate buffers.

int FindRouteWorkaround)
NISESession
NISEConstString
NISEConstString
NISEBuffer *.
NISEInt32 *.
NISEInt32 * routeCapability)
{
NISEStatus errorStatus = 0;
NISEInt32 routeSpecSize1 = 0;
NISEInt32 routeSpecSize2 = 0;
NISEInt32 routeCapability1 = 0;
NISEInt32 routeCapability2 = 0;
NISEBuffer * routeSpec1 = NULL;
NISEBuffer * routeSpec2 = NULL;

If (routeSpec! = NULL)
{
routeSpec1 = calloc (* routeSpecSize, sizeof (NISEBuffer));
routeSpec2 = calloc (* routeSpecSize, sizeof (NISEBuffer));

routeSpecSize1 = * routeSpecSize;
routeSpecSize2 = * routeSpecSize;
}

errorStatus = niSE_FindRoute (niSEHandle, chan1, chan2, routeSpec1, & routeSpecSize1, & routeCapability1);
If (errorStatus! = 0)
{
Return errorStatus;
}

errorStatus = niSE_FindRoute (niSEHandle, chan2, chan1, routeSpec2, & routeSpecSize2, & routeCapability2);
If (errorStatus! = 0)
{
Return errorStatus;
}


{
If (routeSpec! = NULL)
strcpy (routeSpec, routeSpec1);
* routeSpecSize = routeSpecSize1;
* routeCapability = routeCapability1;

Else if (routeCapability1 == 2)
{
If (routeSpec! = NULL)
strcpy (routeSpec, routeSpec1);
* routeSpecSize = routeSpecSize1;
* routeCapability = routeCapability1;
}
Else if (routeCapability2 == 2)
{
If (routeSpec! = NULL)
strcpy (routeSpec, routeSpec2);
* routeSpecSize = routeSpecSize2;
* routeCapability = routeCapability2;
}

If (routeSpec1)
{
free (routeSpec1);
routeSpec1 = NULL;
}

If (routeSpec2)
{
free (routeSpec2);
routeSpec2 = NULL;
}

return 0;
}

Bruno

Tags: NI Products

Similar Questions

  • How to integrate the modules-Ag34980 or switchexec?

    Hello

    I installed Switchexec 2015, IVI 2.3 of shared components, IVI 34980 - driver om system a Windows 7.

    The 34980 will have certain modules like 34932, 34937...

    Everything will be used under TestStand later.

    How can I start now?

    Currently I startetd NI MAX and see that there is an entry "NI Switch Executive Virtual Devices".

    There is a "SwitchExecutiveExample" with two 'SampleMatrix1 and 2'.

    These two "SampleMatrix 1 and 2" are the unter-> logical names IVI drivers and point Sessions drivers o-> Simulated8x8Matrix.

    Example - the roads are visible in TestStand, so everything is correct installed.

    How can I configure my 34980 modules here now?

    I tried to watch videos from firststart on the site of nor, but they do not play.

    Is there something like a first-steps-pdf?

    Thanks for help

    OnlyOne,

    1 OK, lets say to icreated a driver who said that it was the matrix 4 x 32. Can I create all my courses that I need. One day I find that I need another matrix 4 x 32 and adds it to the string of the driver configuration.

    What should I now create a new VirtualDevice and delete the existing) OR can I manually update the existing VirtualDevice to maintain existing routes?

    I don't think that the user interface has a way to do so. I think you might need to export (text or excel) and change the specific topology / other changes you have made. You will also need to add the channels you have added.

    Perhaps the simplest solution is to do the following:

    1. Old virtual device of export

    2. Create a new virtual device with the new settings.

    3. Export the new virtual device

    4. Copy the old roads / exclusions / old virtual again peripheral virtual device etc.

    5. Import the new virtual device subject to change

     

    2. I added a FormC-Switchcard where a switch appears in my VirtualDevice1 Switchexecutive 7001COM, 7001NC and 7001NO.

    Now I could create two routes in Switchexecutive ' Close7001: 7001COM-> 7001NO ' and ' Open7001: 7001COM-> 7001NC. This two-lane are visible in teststand.

     

    But how would I write this without using the predefined routes? Something like "VirtualDevice1.LogicalName1.7001COM, VirtualDevice1.LogicalName1.7001NO"? What is the correct syntax?

    You must use the Properties tab of a step with the selected switching property. You are then the ' path (s) to connect: "field populated with the following expression" [2532 / r0-> 2532/c0] "(including the quotes). 2532 is my logical name of my device. This syntax connects channel 'r0' and 'c0' together on my device of 2532

  • Detect connected lines

    I'm trying to understand the best way to do something.  It is led in TestStand using Switch Executive.

    I have a line of 213 column x 4 2-wire Matrix.  4 rows connect up to 4-channel PXI-5105.  I've defined logical names for each column to go to each of r0, r1, r2 and r3.  Users will choose up to 4 in the columns of 213 to route to the 5105 for sampling. If a user connects 4 channels and then decide they want to try a different channel, I wish I could disconnect only 1 channel, they no longer want and connected to the new channel.  I've defined groups of road called All_To_R0, All_To_R1, etc., with the idea that if the user wants to exchange the R0 channel then I would call an offset on the All_To_R0 who will ensure that what it is related to R0 disconnects and then I plug the new channel.

    However, this generates errors saying roads do not exist, which makes sense, I guess.  I could just call a DisconnectAll and let my users to follow with routes they want to connect.  I could follow this in my driver code but / puts an end to demolitions would stop me to manage accurately the State of the switch.  Is there an 'integrated' way to do?

    To know if a road is connected or not, you can call FindRoute on a NISE session. It's a way to do it, but you need to understand what are the endpoints of a route. You can use the API configuration NISE to understand what roads are part of a group of lines, and what are the endpoints for a given road, if you are not comfortable to hardcode these channel names in your program.

    Another way to determine if the road is connected or not, especially if your end goal is to disconnect, is to call Disconnect on this road and ignore the error indicating that the road did not exist. (You can always capture other errors, however).

  • Connecting two pxi-2527 with NI Switch Executive

    Hello world

    I want to build a test equipment to measure the resistance of the wires. My stock of material contains two cards-MUX pxi-2527 and a pxi-4070 DMM. Each pxi-2527 is connected (via a TB-2627) of a cable harness of the 26 son (name of the harness "6YDA" and "6YDB", see photos).

    The two beams is absolutely equal in the Assembly and naming (for example the sons are named from A to Z).

    First of all, I want to set up a self test function. For this purpose an adapter was built to connect the two cables to driver.

    The adapter connect cable A to the first harness with cable A second son, the first B b to the second and so on.

    For the auto test, simply measure the resistance of adapted connections 26.

    Now I tried to create a virtual device with roads and routegroups via Switch Executive and insert it in my LabView 2009 program.

    But I m not sure if my virtual device is correct. (See pictures attached)

    Unfortunately I have not found an example on the connection of two cards-MUX pxi-2527 together, I need your help.

    I would be very happy to get help from you!

    Thank you very much!

    Greetings,

    E Tec

    Hi E-Tec,

    Looks like you have already setup the roads and the routegroups in SwitchExecutive.  Now let's launch LabVIEW and make some magic; Some examples of code that will test each routegroup:

    The first thing we need to do is log on to your virtual device:

    Then, you must configure our DMM and call certain route groups:

    I made many assumptions on what we are trying to accomplish.  My code does the following:

    1. opening of the session for your named virtual device.

    2. the opening of session for DMM... it has more parameters I have hidden for clarity.  See DMM examples in help"Find examples | "" Material input and output"modular instruments and devices" NOR-DMM ' unique measures ' measure resistance if you want to see the entire feature set.

    3 close your RouteGroups one at a time, measurement of resistance, opens the Routegroup, then measure resistance again.  I put only the first 5 routegroups in this code.

    Which should help you get started.  Sorry to expect if a long time keep .  Have a great day!

    John Sullivan

    Switch Product Support Engineer

    National Instruments

  • With the help of the Executive trial switch

    Hi Ppl,

    I'm using LabVIEW 8.6 trial. When I installed switch via the drivers, I found switch Executive VI are not there. But the installation program displays the NOR - features of the SWITCH must be installed. When I checked the vi.lib file, SwitchExecutive file is missing. And also there was no switch device not listed in devices and Interfaces of MAX.

    Should I activate LabVIEW for use Switch Executive? What is the procedure for installation?

    Thank you

    Hi Lordsathish,

    According to me, NI Switch Executive 3.0 released before LabVIEW 8.6, so the default installation procedure requires no screws NI Switch Executive in LabVIEW 8.6 file.

    To install NI Switch Executive 3.0 for use with the latest version of LabVIEW, select the default option to install support for the latest version of LabVIEW NI Switch Executive installation.

    In your case, you can change the installation NI Switch Executive (from Add/Remove Programs) and select this option.

    I hope this helps!  Let me know if you have any other questions or it is not solved your problem!

    Chad Erickson

    Switch Product Support Engineer

    NOR - USA

Maybe you are looking for

  • How transfer photos from Samsung Galaxy on I Mac Photos?

    I used a USB cable and the pictures do not transfer.  Any ideas on how to do this?  My Samsung has many albums and photos about 400 or more. Thank you

  • -Pop-up anti-virus program

    When I installed AdBlock Plus, I think that this works only on the pop-up windows in the browser. I get very annoying popup windows continually AVG, whose program I use, try to sell me more software. Lately these come about every day. Is it possible

  • Error code 0 x 80070424 on the firewall settings

    Error code 0 x 80070424 Windows Firewall Setting ON and OFF does not give me error code if I use to deliver my FIREWALL which is error code 0 x 80070424. Thank you

  • BlackBerry smartphones help please! no synchronization of calendar after upgrade to 6.0

    I have a torch 9800 and after upgrading my calendars are no longer synchronized. I have a calendar that synchronizes with google sync and another that synchronizes through my business account (also a google via a University account). I checked both c

  • 3 express Iriscan

    I have a new scanner portable iriscan express 3.  I am able to install it in windows 7, but not in windows 8 (64).  It is supposed to be compatible with windows 8 (64).  Y at - it an easy solution to this problem.  I tried with the downloaded driver