Signal¶
API Documentation: [cpp] [python] [.NET] [LabVIEW]
SignalClass. Interface to digital pins configured to produce square wave signals. This class is designed to allow for square waves at various frequencies and duty cycles. Control is defined by specifying the wave period as (T3Time) and the active portion of the cycle as (T2Time). See the entity overview section of the reference for more detail regarding the timing.
Signal entity to Digital entity mapping varies from device to device. Please refer to the datasheet.
The MTM-IO-SERIAL board has 5 Signal Input and 4 Signal outputs. The Signal entity allows you to generate square waves by supplying a period and a time high value. The Signal inputs can also be used as counters. The Signal entity is an overload of the Digital entity and must first be properly configured before it can be enabled.
Set Configurations¶
The configurations for the signal inputs are found in the table below.
stem.digital[index].getConfiguration(digitalConfigurationSignalInput)
[cpp]
[python]
[NET]
[LabVIEW]
Pin |
Input |
Output |
Rail |
Hi-Z |
Servo |
Signal |
---|---|---|---|---|---|---|
DIO 0 |
Yes |
Yes |
1 |
No |
Input |
Input |
DIO 1 |
Yes |
Yes |
1 |
No |
Input |
Input / Output |
DIO 2 |
Yes |
Yes |
1 |
No |
Input |
Input / Output |
DIO 3 |
Yes |
Yes |
1 |
No |
Input |
Input / Output |
DIO 4 |
Yes |
Yes |
2 |
No |
Output |
Input / Output |
DIO 5 |
Yes |
Yes |
2 |
No |
Output |
|
DIO 6 |
Yes |
Yes |
2 |
No |
Output |
|
DIO 7 |
Yes |
Yes |
2 |
No |
Output |
Get/Set Enable¶
stem.signal[index].setEnable(bEnable)
[cpp]
[python]
[NET]
[LabVIEW]
stem.signal[index].getEnable()
[cpp]
[python]
[NET]
[LabVIEW]
Get/Set T3 Time¶
The T3 time defines the period of the waveform in nano seconds.
stem.signal[index].setT3Time(period)
[cpp]
[python]
[NET]
[LabVIEW]
stem.signal[index].getT3Time()
[cpp]
[python]
[NET]
[LabVIEW]
Get/Set T2 Time¶
The T2 time defines the high period of the waveform in nano seconds.
stem.signal[index].setT2Time(timeHigh)
[cpp]
[python]
[NET]
[LabVIEW]
stem.signal[index].getT2Time()
[cpp]
[python]
[NET]
[LabVIEW]
Get/Set Invert¶
Inverts the meaning of the T2 time. When inverted the T2 time will represent the time in nano seconds that the waveform is low.
stem.signal[index].setInvert()
[cpp]
[python]
[NET]
[LabVIEW]
stem.signal[index].getInvert()
[cpp]
[python]
[NET]
[LabVIEW]