Block: ManualSwitch



PIC




Inports


In1

Input #1



In2

Input #2






Outports


Out






Mask Parameters


Toggle

Toggle




Description:

Toggling between inputs by double-clicking on block.

Doubleclicking of the ManualSwitch block changes the routing of the input signals and doesn't open the Function Block Parameters dialog. So if changing the implementation is required, one has to open the dialog via Mask Parameters command of the context menu.

Developer note: To get the double-click feature the callback function of OpenFnc in Block Properties is manually altered to

if get_param(gcb,'Toggle') == '0' 
    set_param(gcb,'Toggle', '1'); 
else 
   set_param(gcb,'Toggle', '0'); 
end 
setBlockData(gcs, gcb); 
initSFunction(gcb);

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation
Float32 32 Bit Floating Point Implementation
Float64 64 Bit Floating Point Implementation

Implementation: FiP8


Name FiP8
ID 144
Revision 1
C lename ManualSwitch_FiP8.c
H lename ManualSwitch_FiP8.h

8 Bit Fixed Point Implementation



Controller Parameters


Toggle

Toggle info




Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In1; 
     int8          *In2; 
     int8          Out; 
     int8          Toggle; 
} MANUALSWITCH_FIP8;

Implementation: FiP16


Name FiP16
ID 145
Revision 1
C lename ManualSwitch_FiP16.c
H lename ManualSwitch_FiP16.h

16 Bit Fixed Point Implementation



Controller Parameters


Toggle

Toggle info




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In1; 
     int16         *In2; 
     int16         Out; 
     int8          Toggle; 
} MANUALSWITCH_FIP16;

Implementation: FiP32


Name FiP32
ID 146
Revision 1
C lename ManualSwitch_FiP32.c
H lename ManualSwitch_FiP32.h

32 Bit Fixed Point Implementation



Controller Parameters


Toggle

Toggle info




Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In1; 
     int32         *In2; 
     int32         Out; 
     int8          Toggle; 
} MANUALSWITCH_FIP32;

Implementation: Float32


Name Float32
ID 147
Revision 0.1
C lename ManualSwitch_Float32.c
H lename ManualSwitch_Float32.h

32 Bit Floating Point Implementation



Controller Parameters


Toggle

Toggle info




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In1; 
     int16         *In2; 
     int16         Out; 
     int8          Toggle; 
} MANUALSWITCH_FLOAT32;

Implementation: Float64


Name Float64
ID 148
Revision 0.1
C lename ManualSwitch_Float64.c
H lename ManualSwitch_Float64.h

64 Bit Floating Point Implementation



Controller Parameters


Toggle

Toggle info




Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In1; 
     int16         *In2; 
     int16         Out; 
     int8          Toggle; 
} MANUALSWITCH_FLOAT64;