nScopeAPI
v0.8
|
contains function headers for controlling the nScope pulse outputs More...
Functions | |
NSCOPE_API ErrorType | nScope_set_PX_on (ScopeHandle nScope, int pChannel, bool PXon) |
Set a pulse channel (on/off) More... | |
NSCOPE_API ErrorType | nScope_get_PX_on (ScopeHandle nScope, int pChannel, bool *PXon) |
Get a pulse channel (on/off) More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_on (ScopeHandle nScope, bool P1on, bool P2on) |
Set the pulse channels (on/off) More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_on (ScopeHandle nScope, bool *pulseGensOn) |
Get the pulse channels (on/off) More... | |
NSCOPE_API ErrorType | nScope_set_PX_frequency_in_hz (ScopeHandle nScope, int pChannel, double frequency) |
Set a pulse channel frequency in hz. More... | |
NSCOPE_API ErrorType | nScope_get_PX_frequency_in_hz (ScopeHandle nScope, int pChannel, double *frequency) |
Get a pulse channel frequency in hz. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_frequencies_in_hz (ScopeHandle nScope, double frequency1, double frequency2) |
Set the pulse channel frequencies in hz. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_frequencies_in_hz (ScopeHandle nScope, double *pulseFrequencies) |
Get the pulse channel frequencies in hz. More... | |
NSCOPE_API ErrorType | nScope_set_PX_period_in_ms (ScopeHandle nScope, int pChannel, double period) |
Set a pulse channel period in milliseconds. More... | |
NSCOPE_API ErrorType | nScope_get_PX_period_in_ms (ScopeHandle nScope, int pChannel, double *period) |
Get a pulse channel period in milliseconds. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_periods_in_ms (ScopeHandle nScope, double period1, double period2) |
Set a pulse channel periods in milliseconds. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_periods_in_ms (ScopeHandle nScope, double *pulsePeriods) |
Get a pulse channel periods in milliseconds. More... | |
NSCOPE_API ErrorType | nScope_set_PX_period_in_us (ScopeHandle nScope, int pChannel, double period) |
Set a pulse channel period in microseconds. More... | |
NSCOPE_API ErrorType | nScope_get_PX_period_in_us (ScopeHandle nScope, int pChannel, double *period) |
Get a pulse channel period in microseconds. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_periods_in_us (ScopeHandle nScope, double period1, double period2) |
Set a pulse channel periods in microseconds. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_periods_in_us (ScopeHandle nScope, double *pulsePeriods) |
Get a pulse channel periods in microseconds. More... | |
NSCOPE_API ErrorType | nScope_set_PX_duty_percentage (ScopeHandle nScope, int pChannel, double duty) |
Set a pulse channel duty percentage. More... | |
NSCOPE_API ErrorType | nScope_get_PX_duty_percentage (ScopeHandle nScope, int pChannel, double *duty) |
Get a pulse channel duty percentage. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_duty_percentages (ScopeHandle nScope, double duty1, double duty2) |
Set the pulse channel duty percentages. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_duty_percentages (ScopeHandle nScope, double *dutyPercentages) |
Get the pulse channel duty percentages. More... | |
NSCOPE_API ErrorType | nScope_set_PX_pulse_width_in_ms (ScopeHandle nScope, int pChannel, double pulseWidth) |
Set a pulse width in milliseconds on a pulse channel. More... | |
NSCOPE_API ErrorType | nScope_get_PX_pulse_width_in_ms (ScopeHandle nScope, int pChannel, double *pulseWidth) |
Get a pulse width in milliseconds on a pulse channel. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_pulse_widths_in_ms (ScopeHandle nScope, double pulseWidth1, double pulseWidth2) |
Set the pulse widths in milliseconds on the pulse channels. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_pulse_widths_in_ms (ScopeHandle nScope, double *pulseWidths) |
Get the pulse widths in milliseconds on the pulse channels. More... | |
NSCOPE_API ErrorType | nScope_set_PX_pulse_width_in_us (ScopeHandle nScope, int pChannel, double pulseWidth) |
Set a pulse width in microseconds on a pulse channel. More... | |
NSCOPE_API ErrorType | nScope_get_PX_pulse_width_in_us (ScopeHandle nScope, int pChannel, double *pulseWidth) |
Get a pulse width in microseconds on a pulse channel. More... | |
NSCOPE_API ErrorType | nScope_set_P1_P2_pulse_widths_in_us (ScopeHandle nScope, double pulseWidth1, double pulseWidth2) |
Set the pulse widths in microseconds on the pulse channels. More... | |
NSCOPE_API ErrorType | nScope_get_P1_P2_pulse_widths_in_us (ScopeHandle nScope, double *pulseWidths) |
Get the pulse widths in microseconds on the pulse channels. More... | |
NSCOPE_API ErrorType | nScope_send_PX_oneshot_pulse (ScopeHandle nScope, int pChannel, double pulseWidth) |
Send a single pulse out on a pulse channel. More... | |
NSCOPE_API ErrorType | nScope_send_P1_P2_oneshot_pulses (ScopeHandle nScope, double pulseWidth1, double pulseWidth2) |
Send a single pulse out on both pulse channels. More... | |
contains function headers for controlling the nScope pulse outputs
nScope has two pulse generators, P1 and P2, that output pulse signals from 0 to 5V. These signals are good for use with digital logic or for driving the logic of H-bridge controllers.
These functions provide control over the timing characteristics of the two pulse outputs.
NSCOPE_API ErrorType nScope_get_P1_P2_duty_percentages | ( | ScopeHandle | nScope, |
double * | dutyPercentages | ||
) |
Get the pulse channel duty percentages.
The duty percentage is the ratio of the time the output is high to the total period of the pulse. A duty of 100% means the signal is always 5V, and a signal of 0V means the signal is always 0V.
[in] | nScope | nScope handle |
[out] | dutyPercentages | pointer to an array of doubles to store the actual pulse duty percentages (0.0-100.0) |
NSCOPE_API ErrorType nScope_get_P1_P2_frequencies_in_hz | ( | ScopeHandle | nScope, |
double * | pulseFrequencies | ||
) |
Get the pulse channel frequencies in hz.
[in] | nScope | nScope handle |
[out] | pulseFrequencies | pointer to an array of doubles to store the actual pulse frequencies |
NSCOPE_API ErrorType nScope_get_P1_P2_on | ( | ScopeHandle | nScope, |
bool * | pulseGensOn | ||
) |
Get the pulse channels (on/off)
A true state means the pulse channel is on and outputing voltage A false state means the pulse channel is held at ground
[in] | nScope | nScope handle |
[out] | pulseGensOn | pointer to boolean array to store the on/off states of the pulse channels |
NSCOPE_API ErrorType nScope_get_P1_P2_periods_in_ms | ( | ScopeHandle | nScope, |
double * | pulsePeriods | ||
) |
Get a pulse channel periods in milliseconds.
The pulse period is the time between pulses on the output channel
[in] | nScope | nScope handle |
[out] | pulsePeriods | pointer to an array of doubles to store the actual pulse periods (ms) |
NSCOPE_API ErrorType nScope_get_P1_P2_periods_in_us | ( | ScopeHandle | nScope, |
double * | pulsePeriods | ||
) |
Get a pulse channel periods in microseconds.
The pulse period is the time between pulses on the output channel
[in] | nScope | nScope handle |
[out] | pulsePeriods | pointer to an array of doubles to store the actual pulse periods (µs) |
NSCOPE_API ErrorType nScope_get_P1_P2_pulse_widths_in_ms | ( | ScopeHandle | nScope, |
double * | pulseWidths | ||
) |
Get the pulse widths in milliseconds on the pulse channels.
The pulse width is the amount of time the signal is high (5V) during each cycle
[in] | nScope | nScope handle |
[out] | pulseWidths | pointer to an array of doubles to store the actual pulse widths (ms) |
NSCOPE_API ErrorType nScope_get_P1_P2_pulse_widths_in_us | ( | ScopeHandle | nScope, |
double * | pulseWidths | ||
) |
Get the pulse widths in microseconds on the pulse channels.
The pulse width is the amount of time the signal is high (5V) during each cycle
[in] | nScope | nScope handle |
[out] | pulseWidths | pointer to an array of doubles to store the actual pulse widths (µs) |
NSCOPE_API ErrorType nScope_get_PX_duty_percentage | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | duty | ||
) |
Get a pulse channel duty percentage.
The duty percentage is the ratio of the time the output is high to the total period of the pulse. A duty of 100% means the signal is always 5V, and a signal of 0V means the signal is always 0V.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | duty | pointer to the actual pulse duty percentage (0.0-100.0) |
NSCOPE_API ErrorType nScope_get_PX_frequency_in_hz | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | frequency | ||
) |
Get a pulse channel frequency in hz.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | frequency | pointer to the actual pulse frequency of the channel |
NSCOPE_API ErrorType nScope_get_PX_on | ( | ScopeHandle | nScope, |
int | pChannel, | ||
bool * | PXon | ||
) |
Get a pulse channel (on/off)
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[in] | PXon | pointer to boolean to store the on/off state of the queried channel |
NSCOPE_API ErrorType nScope_get_PX_period_in_ms | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | period | ||
) |
Get a pulse channel period in milliseconds.
The pulse period is the time between pulses on the output channel
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | period | pointer to the actual pulse period (ms) of the channel |
NSCOPE_API ErrorType nScope_get_PX_period_in_us | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | period | ||
) |
Get a pulse channel period in microseconds.
The pulse period is the time between pulses on the output channel
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | period | pointer to the actual pulse period (µs) of the channel |
NSCOPE_API ErrorType nScope_get_PX_pulse_width_in_ms | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | pulseWidth | ||
) |
Get a pulse width in milliseconds on a pulse channel.
The pulse width is the amount of time the signal is high (5V) during each cycle
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | pulseWidth | pointer to the actual pulse width (ms) |
NSCOPE_API ErrorType nScope_get_PX_pulse_width_in_us | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double * | pulseWidth | ||
) |
Get a pulse width in microseconds on a pulse channel.
The pulse width is the amount of time the signal is high (5V) during each cycle
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to query |
[out] | pulseWidth | pointer to the actual pulse width (µs) |
NSCOPE_API ErrorType nScope_send_P1_P2_oneshot_pulses | ( | ScopeHandle | nScope, |
double | pulseWidth1, | ||
double | pulseWidth2 | ||
) |
Send a single pulse out on both pulse channels.
The pulse width is the amount of time (ms) the signal is high (5V)
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pulseWidth1 | the desired pulse width (ms) on P1 |
[in] | pulseWidth2 | the desired pulse width (ms) on P2 |
NSCOPE_API ErrorType nScope_send_PX_oneshot_pulse | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | pulseWidth | ||
) |
Send a single pulse out on a pulse channel.
The pulse width is the amount of time (ms) the signal is high (5V)
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to use |
[in] | pulseWidth | the desired pulse width (ms) |
NSCOPE_API ErrorType nScope_set_P1_P2_duty_percentages | ( | ScopeHandle | nScope, |
double | duty1, | ||
double | duty2 | ||
) |
Set the pulse channel duty percentages.
The duty percentage is the ratio of the time the output is high to the total period of the pulse. A duty of 100% means the signal is always 5V, and a signal of 0V means the signal is always 0V.
Not all duty percentages can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | duty1 | the desired pulse duty percentage (0.0-100.0) on P1 |
[in] | duty2 | the desired pulse duty percentage (0.0-100.0) on P2 |
NSCOPE_API ErrorType nScope_set_P1_P2_frequencies_in_hz | ( | ScopeHandle | nScope, |
double | frequency1, | ||
double | frequency2 | ||
) |
Set the pulse channel frequencies in hz.
Not all frequency values can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | frequency1 | the desired frequency of P1 |
[in] | frequency2 | the desired frequency of P2 |
NSCOPE_API ErrorType nScope_set_P1_P2_on | ( | ScopeHandle | nScope, |
bool | P1on, | ||
bool | P2on | ||
) |
Set the pulse channels (on/off)
A true state means the pulse channel is on and outputing voltage A false state means the pulse channel is held at ground
[in] | nScope | nScope handle |
[out] | P1on | true: turn P1 on, false: turn it off |
[out] | P2on | true: turn P2 on, false: turn it off |
NSCOPE_API ErrorType nScope_set_P1_P2_periods_in_ms | ( | ScopeHandle | nScope, |
double | period1, | ||
double | period2 | ||
) |
Set a pulse channel periods in milliseconds.
The pulse period is the time between pulses on the output channel
Not all pulse periods can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | period1 | the desired pulse period (ms) on P1 |
[in] | period2 | the desired pulse period (ms) on P2 |
NSCOPE_API ErrorType nScope_set_P1_P2_periods_in_us | ( | ScopeHandle | nScope, |
double | period1, | ||
double | period2 | ||
) |
Set a pulse channel periods in microseconds.
The pulse period is the time between pulses on the output channel
Not all pulse periods can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | period1 | the desired pulse period (µs) on P1 |
[in] | period2 | the desired pulse period (µs) on P2 |
NSCOPE_API ErrorType nScope_set_P1_P2_pulse_widths_in_ms | ( | ScopeHandle | nScope, |
double | pulseWidth1, | ||
double | pulseWidth2 | ||
) |
Set the pulse widths in milliseconds on the pulse channels.
The pulse width is the amount of time the signal is high (5V) during each cycle
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pulseWidth1 | the desired pulse width (ms) on P1 |
[in] | pulseWidth2 | the desired pulse width (ms) on P2 |
NSCOPE_API ErrorType nScope_set_P1_P2_pulse_widths_in_us | ( | ScopeHandle | nScope, |
double | pulseWidth1, | ||
double | pulseWidth2 | ||
) |
Set the pulse widths in microseconds on the pulse channels.
The pulse width is the amount of time the signal is high (5V) during each cycle
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pulseWidth1 | the desired pulse width (µs) on P1 |
[in] | pulseWidth2 | the desired pulse width (µs) on P2 |
NSCOPE_API ErrorType nScope_set_PX_duty_percentage | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | duty | ||
) |
Set a pulse channel duty percentage.
The duty percentage is the ratio of the time the output is high to the total period of the pulse. A duty of 100% means the signal is always 5V, and a signal of 0V means the signal is always 0V.
Not all duty percentages can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | duty | the desired pulse duty percentage (0.0-100.0) |
NSCOPE_API ErrorType nScope_set_PX_frequency_in_hz | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | frequency | ||
) |
Set a pulse channel frequency in hz.
Not all frequency values can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | frequency | the desired pulse frequency of the channel |
NSCOPE_API ErrorType nScope_set_PX_on | ( | ScopeHandle | nScope, |
int | pChannel, | ||
bool | PXon | ||
) |
Set a pulse channel (on/off)
A true state means the pulse channel is on and outputing voltage A false state means the pulse channel is held at ground
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to turn on or off |
[in] | PXon | true: turn the channel on, false: turn it off |
NSCOPE_API ErrorType nScope_set_PX_period_in_ms | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | period | ||
) |
Set a pulse channel period in milliseconds.
The pulse period is the time between pulses on the output channel
Not all pulse periods can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | period | the desired pulse period (ms) of the channel |
NSCOPE_API ErrorType nScope_set_PX_period_in_us | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | period | ||
) |
Set a pulse channel period in microseconds.
The pulse period is the time between pulses on the output channel
Not all pulse periods can be acheived, nScope will automatically choose the closest approximation
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | period | the desired pulse period (µs) of the channel |
NSCOPE_API ErrorType nScope_set_PX_pulse_width_in_ms | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | pulseWidth | ||
) |
Set a pulse width in milliseconds on a pulse channel.
The pulse width is the amount of time the signal is high (5V) during each cycle
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | pulseWidth | the desired pulse width (ms) |
NSCOPE_API ErrorType nScope_set_PX_pulse_width_in_us | ( | ScopeHandle | nScope, |
int | pChannel, | ||
double | pulseWidth | ||
) |
Set a pulse width in microseconds on a pulse channel.
The pulse width is the amount of time the signal is high (5V) during each cycle
Not all pulse widths can be acheived, nScope will automatically choose the closest approximation.
[in] | nScope | nScope handle |
[in] | pChannel | the channel (1 or 2) to set |
[in] | pulseWidth | the desired pulse width (µs) |