Sets the specified rail’s source.
Gx3348SetRailSource (nHandle, nRail, nRailSource, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX3348 board. |
nRail |
SHORT |
Rail number:0. GX3348_RAIL_A: connect to rail A1. GX3348_RAIL_B: connect to rail B2. GX3348_RAIL_C: connect to rail C3. GX3348_GROUND: connect to ground-1 GX3348_RAIL_NONE: no rail is connected. |
nRailSource |
SHORT |
Rail source:0. GX3348_RAIL_SOURCE_INTERNAL_DAC: Internal rail dac. All three on-board rails (A through C), have a dedicated DAC that can be set from -20V to +32V.1. GX3348_RAIL_SOURCE_EXTERNAL rails A and C can be connected to an external source via the front J6 68 pin connector,2. GX3348_RAIL_SOURCE_INTERNAL_5V: Rail B can be connected to an on-board 5V source.3. GX3348_RAIL_SOURCE_EXTERNAL_AMPLIFIED: Rail A can be connected to an external source which will be amplified by a nominal gain of 6.6 and can amplify signals from DC to > 10 KHz. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Rails sources are as follow:
GX3348_RAIL_A:
2. GX3348_RAIL_SOURCE_INTERNAL_DAC: dedicated Rail A dac can be set from -20V to +32V.
3. GX3348_RAIL_SOURCE_EXTERNAL: rail A can be connected to an external source via the front J6 68 pin connector,
4. GX3348_RAIL_SOURCE_EXTERNAL_AMPLIFIED: rail A can be connected to an external source which will be amplified by a factor of 3.
GX3348_RAIL_B:
1. GX3348_RAIL_SOURCE_INTERNAL_DAC: dedicated Rail B dac can be set from -20V to +32V.
3. GX3348_RAIL_SOURCE_INTERNAL_5V: Rail B can be connected to an on-board 5V source.
GX3348_RAIL_C:
2. GX3348_RAIL_SOURCE_INTERNAL_DAC: dedicated Rail C dac can be set from -20V to +32V.
3. GX3348_RAIL_SOURCE_EXTERNAL rail C can be connected to an externla source via the front J6 68 pin connector
The following example does the following:
1. Sets Rail A DAC (GX3348_RAIL_DAC_A) to 5V and read back the settings.
2. Sets Rail B DAC (GX3348_RAIL_DAC_B) to 10V and read back the settings.
3. Sets Rail C DAC (GX3348_RAIL_DAC_A) to -5V and read back the settings.
4. Sets rail A source to its internal DAC (DAC A) and read back the settings.
5. Sets rail B source to its on-board 5V and read back the settings.
6. Sets rail C source to external and read back the settings.
7. Connect group A channel 1 to rail A and read back the settings.
8. Connect group B channel 5 to rail C and read back the settings.
9. Connect group C channel 10 to rail B and read back the settings.
10.Measure the output voltages on group A channel 1 and group C channel 10.
SHORT nRail, nRailsource, nStatus;
DOUBLE dVoltage, dMeasurement;
Gx3348SetDac(nHandle, GX3348_DAC_RAIL_A, 5.0, &nStatus);
Gx3348GetDac(nHandle, GX3348_DAC_RAIL_A, &dVoltage, &nStatus);
Gx3348SetDac(nHandle, GX3348_DAC_RAIL_B, 10.0, &nStatus);
Gx3348GetDac(nHandle, GX3348_DAC_RAIL_B, &dVoltage, &nStatus);
Gx3348SetDac(nHandle, GX3348_DAC_RAIL_C, -5.0, &nStatus);
Gx3348GetDac(nHandle, GX3348_DAC_RAIL_C, &dVoltage, &nStatus);
Gx3348SetRailSource(nHandle, GX3348_RAIL_A, GX3348_RAIL_SOURCE_INTERNAL_DAC, &nStatus);
Gx3348GetRailSource(nHandle, GX3348_RAIL_A, &nRailSource, &nStatus);
Gx3348SetRailSource(nHandle, GX3348_RAIL_B, GX3348_RAIL_SOURCE_INTERNAL_5V, &nStatus);
Gx3348GetRailSource(nHandle, GX3348_RAIL_B, &nRailSource, &nStatus);
Gx3348SetRailSource(nHandle, GX3348_RAIL_C, GX3348_RAIL_SOURCE_EXTERNAL, &nStatus);
Gx3348GetRailSource(nHandle, GX3348_RAIL_C, &nRailSource, &nStatus);
Gx3348SetChannelRail(nHandle, GX3348_GROUP_A, 1, GX3348_RAIL_A, &nStatus);
Gx3348GetChannelRail(nHandle, GX3348_GROUP_A, 1, &nRail, &nStatus);
Gx3348SetChannelRail(nHandle, GX3348_GROUP_B, 5, GX3348_RAIL_C, &nStatus);
Gx3348GetChannelRail(nHandle, GX3348_GROUP_B, 5, &nRail, &nStatus);
Gx3348SetChannelRail(nHandle, GX3348_GROUP_C, 10, GX3348_RAIL_B, &nStatus);
Gx3348GetChannelRail(nHandle, GX3348_GROUP_C, 10, &nRail, &nStatus);
Gx3348Measure(nHandle, GX3348_GROUP_A, 1, &dMeasurement, &nStatus);
Gx3348Measure(nHandle, GX3348_GROUP_B, 5, &dMeasurement, &nStatus);
Gx3348Measure(nHandle, GX3348_GROUP_C, 10, &dMeasurement, &nStatus);
Gx3348SetChannelRail, Gx3348SetDac,Gx3348SetDigitalOutputs, Gx3348SetRailSource, GxPdoGetErrorString