Initialize Session with Phys Chans VI
- Updated2024-06-26
- 4 minute(s) read
Initializes an SLSC session with one or multiple physical channels. The session opens network connections for devices that correspond to the physical channels. If reservation access is set to Read Only or Read/Write, the session also reserves the devices.
This VI saves the specified physical channel names in the Session.DefaultPhysChans property as the default physical channels of the session. This VI also saves the corresponding device names in the Session.DefaultDevices property as the defaults device of the session. You may change the session default physical channels or session default devices by setting the Session.DefaultPhysChans property or Session.DefaultDevices property.
You cannot use the Abort Session VI to cancel any blocking network operations performed by this VI. If you need to programmatically abort blocking network operations, use the Initialize Session without Resources instance of the Initialize Session VI to obtain a session reference, then use the Connect to Devices VI to open network connections for the devices and the Reserve Devices VI to reserve the devices.

Inputs/Outputs
![]() physical channels specifies the physical channel(s) to access. For multiple physical channels, use a comma-delimited list or colon-delimited range of physical channels. Example: "Mod1/load0:2" ![]() reservation access (Read/Write) specifies how you plan to access the session. The default is Read/Write. ![]() reservation group allows sharing read/write reservations. When multiple sessions attempt to simultaneously reserve the same devices for read/write access, the reservation succeeds if they have the same reservation group. Reservation fails if they do not have the same reservation group. If you specify an empty string or do not specify this parameter, only one session can reserve the devices for read/write access at a time. Read-only reservations may share devices without specifying a reservation group. ![]() error in (no error) describes error conditions that occur before this node runs. This input provides standard error in functionality. ![]() connect timeout (60 sec) specifies the maximum amount of time, in seconds, to wait when connecting to the specified resource. This VI returns an error if timeout expires. ![]() reservation timeout (5 sec) specifies the maximum amount of time, in seconds, to wait to reserve a device that has been reserved by other sessions. The default is 5. If you set reservation timeout to -1, reservation timeout uses the value of the Session.ReservationTimeout property. If reservation_timeout is greater than 0 and reservation access is Read/Write, a deadlock may occur when multiple sessions that use the same group name try to reserve multiple devices. The following table shows a deadlock condition that occurs when two sessions try to reserve two modules.
Both session 1 and session 2 return errors when timeout expires. To avoid the deadlock, ensure that session 1 and session 2 reserve modules in the same order. If session 1 reserves module 1 first and then reserves module 2, ensure that session 2 also reserves module 1 first and then reserves module 2. ![]() session out is a reference to the newly created session. ![]() error out contains error information. This output provides standard error out functionality. |