Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

iviSwitch - matrix topology and channel connection

I am working on driver to switch device compliant with iviSwtich Standard. Skeleton of driver was created in CVI due to this http://www.ni.com/white-paper/3449/en/

Before I will ask some questions, I would like to know if matrix topology I created in driver is correct. Simplified image is added to attachments, there should be more rows. Are all X, Y and A,B,C,D channels are source channels, are all R channels are configuration channels? Second question, are dependencies presented below are correct? They are based on http://www.ni.com/white-paper/3449/en/#toc3

 

        X1 X2 Y1 Y2 R1 R2 A B
-------------------------------------
X1  | x    x     x    x    0    x   x  x
X2  | x    x     x    x    x    0   x  x
Y1  | x    x     x    x    0    x   x  x
Y2  | x    x     x    x    x    0   x  x
R1 | 0    x     0   x    x    x   0  0
R2 | x    0     x   0    x    x   0  0
A    | x    x     x    x    0    0   x  x
B    | x    x     x    x    0    0   x  x

 

1. My problem is that NI rules doesn't allow to create path for example from X1 to Y2 in one connect function. Path should be in this case X1->R1,R1->A,A->R2,R2->Y2 but its impossible becuase A is not a config channel. So only option to create path from X1 to Y2 is to make two steps X1 to A connection and A to Y2 connection. Is it OK?

2. Another thing is that for example I want to create path from X1 to Y1 and then to connect A to this path. This is impossible because R1 config channel is market as connected after connecting X1 to Y1. 

 

I will be greatful for any answers and clarifications.

0 Kudos
Message 1 of 7
(6,525 Views)

Hi Tomek,

 

According to the tutorial http://www.ni.com/white-paper/3449/en/ , it is stated that you can not connect directly two columns or two rows between eachother, you will have to make a path that include rwo - column row or column - row - colmn. See the following video http://screencast.com/t/J5QGFYMxMl

 

 

Just to answer your questions, does it make any difference from electrical point of view if you have X1->R1,R1->A,A->R2 or X1 -> R1, A-> R1, A-> Y2 ?? What do you think?

 

Also, please explain what is A and B? Are you refering to analog lines that you may have?

 

Best regards,

IR

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

A couple of observations with respect to the topology presented and IviSwtch method of operation:

- you should understand that configuration channel is not necessarily a permanent fixture, it is something that the users should be allowed to change based on their needs

- along the same lines, source channel designation should be left entirely to the user of the driver to decide on - it is used to prevent accidental connectivity between two channels that should be isolated from one another.

 

Now, once the channel is designated as configuration channel, it can no longer be used as an endpoint. This provides clearer rules for routing engine at the expense of limiting the number of externally connectable endpoints.

 

In your specific case, I assume that channels r1,2,3 are not connectable from the outside, and are justfuly designated as configuration channels. If you want to, the driver implementation can prevent marking those channels as non-configuration channels in order to prevent accidental crippling of routing engine if someone marks e.g. r2 as non-configuration.

 

If the use case is to connect X-channels to columns A,B,C,D etc, then those channels (A,B,C,D) shall remain non-configuration channels.

If the use case is to connect X channels to Y channels, then A,B,C,D shall be set to be configuration channels.

 

This action can be left to the driver client to set (the program controlling the switch shall set the 'is configuration channel' attribute to true on A,B,C,D if that's desired.

 

An alternative to this (if you do not want to burden the driver client with setting those attributes) is to provide default configurations in the driver, and have the DriverSetup option that the users can pass to InitWithOptions function, indicating the desired use of the driver. This would, based on the specified driver setup option, set the IsConfigurationChannel attributes on column channels appropriately.

 

Then, your clients would be able to Connect(X,Y) right after initializing the driver.

 

The Switch Executive is the switch management software that deals with such intricacies for the client, you should look at it for an alternative to having only a low level IVI driver.

 

I hope this sheds some light on how to develop a driver for your topology - feel free to keep the discussion alive if you still have questions you'd like clarified.

0 Kudos
Message 3 of 7
(6,476 Views)

Srđan_Zirojević,

 

Thank you very much fo detailed answer! More things are now clear but I have another questions.

 

A couple of observations with respect to the topology presented and IviSwtch method of operation:

- you should understand that configuration channel is not necessarily a permanent fixture, it is something that the users should be allowed to change based on their needs

- along the same lines, source channel designation should be left entirely to the user of the driver to decide on - it is used to prevent accidental connectivity between two channels that should be isolated from one another.

 

That is important information that user sets source channels, now make lot of sense for me. 

 

Now, once the channel is designated as configuration channel, it can no longer be used as an endpoint. This provides clearer rules for routing engine at the expense of limiting the number of externally connectable endpoints.

 

In your specific case, I assume that channels r1,2,3 are not connectable from the outside, and are justfuly designated as configuration channels. If you want to, the driver implementation can prevent marking those channels as non-configuration channels in order to prevent accidental crippling of routing engine if someone marks e.g. r2 as non-configuration.

 

If the use case is to connect X-channels to columns A,B,C,D etc, then those channels (A,B,C,D) shall remain non-configuration channels.

If the use case is to connect X channels to Y channels, then A,B,C,D shall be set to be configuration channels.

 

This action can be left to the driver client to set (the program controlling the switch shall set the 'is configuration channel' attribute to true on A,B,C,D if that's desired.

 

Use case is to connect X-channels to Y-channels but with option to connect to this path A,B,C or D lines. For example, I create a path with input on X1, output on Y1 and I want to connect oscilloscope to this path. If oscilloscope is on the line A, then line A cannot be configuration channel, because as you wrote earlier config channel cannot be endpoint. Lines A,B,C,D have to also mediate in connection between X and Y in different rows. I have attached two examples.

 

Here I see some problem with IVI standard. For example when I connect X1 to Y1, driver will mark R1 channel as "config channel in use". Now if I want to connect A to this path, its not possible because R1 channel is used and driver returns error. I could workaround this but it would break standard rule:
"If one of the channels in the path list is a configuration channel that is currently in use, this function returns the error Resource In Use without performing any connection operation." Do you see any solution for that situation?

Download All
0 Kudos
Message 4 of 7
(6,452 Views)

Hi IonR,

 

Thank you for your answer.

 

According to the tutorial http://www.ni.com/white-paper/3449/en/ , it is stated that you can not connect directly two columns or two rows between eachother, you will have to make a path that include rwo - column row or column - row - colmn. See the following video http://screencast.com/t/J5QGFYMxMl

 

 That is clear for me.

 

Just to answer your questions, does it make any difference from electrical point of view if you have X1->R1,R1->A,A->R2 or X1 -> R1, A-> R1, A-> Y2 ?? What do you think?

 

From electrical point of view its not a difference. Problem is when it comes to writting driver becuase there is lot of restriction in path creating.

 

Also, please explain what is A and B? Are you refering to analog lines that you may have?

 

A,B,C,D are analog lines. You can connect to them for example oscilloscope, but they also mediate in connection between X and Y channels in different rows. I have expand this thread in previous post. 

 

Best regards,

Tomek

0 Kudos
Message 5 of 7
(6,445 Views)

Hi tomek123,

 

I understand now what is the end user intent here. Yes, the switch driver as defined by IVI will limit you in what you can do routing-wise, because it will not let you reuse the routing channel r1 for more than one concurrent connection.

There are 2 approaches you could use here:

- create a special mode in your switch driver that will allow this reuse of channels reserved for routing (a.k.a. configuration channels). By doing this, you will break ivi compliance, but the driver will do what you need it to do when this mode is enacted. You can enact the mode with a mode attribute, or preferably via a driversetup option at initialization time (or both).

- use NI Switch Executive routing engine. The switch executive has recognized the limitations of IVI Switch specification, and allowed for additional routing options. It has the same/similar comcept of source and configuration channels, (it calls configuration channels 'reserved for routing channels'), but it allows exactly what you're trying to do here with connecting the endpoint to 2 different outer channels. It also has a concept of named routes and named route groups, where you could create a group of 2 routes, one going from x1 to y1, and another one from x1 to A, calling this 'group1', and so on. You could also control which routing channel to use in the x2 to y3 case - if all of the channels A through D were to be marked as configuration channels, the routing engine would pick one of them - you could go into switch executive routing, and change the route to use the channel you prefer (e.g. channel A even though the engine picked channel B for this route initially).

 

NI Switch Executive exists in evaliation mode - I highly recommend checking it out. Again, you can go for option 1, and do this yourself, but that's a lot of additional code and additional logic to design, and it exists already!

 

good luck with whatever you decide!

 

0 Kudos
Message 6 of 7
(6,413 Views)

Srđan_Zirojević,

 

Thank you again. I have to decide calmly which way to choose but probably it will be first method. Your advices were definitly very helpful.

 

Regards

Tomek

0 Kudos
Message 7 of 7
(6,396 Views)