#include <iostream>
#include <quickDAQ.h>
Go to the source code of this file.
|
unsigned | myosynNumMuscles () |
| Returns the number of muscles configured by the library.
|
|
DAQarrangement | myosynGetConfiguration () |
|
void | myosynSetConfiguration (DAQarrangement DAQconfiguration) |
| Set the muscle configuration/arrangement type of the library. List of possibilities in the DAQarrangement enum.
|
|
double | myosynSamplingRate (double newSamplingRate=myosyn_samplingRate_global) |
| Sets the sampling rate of the data acquisition and controller of all the muscle channels. The default rate is 1000Hz.
|
|
void | myosynStart () |
| This routine starts the data acquisition on all muscle channels that haven't already been started so long as at least one channel has been configured.
|
|
void | myosynStop () |
| This function sops the data acquisition of all muscle channels that were started (ie. active).
|
|
void | myosynSetLeaderChannel (int newLeader) |
| Sets the leader/master muscle channel which governs/triggers data acquisition on all other muscles.
|
|
int | myosynGetLeaderChannel () |
| Returns the leader muscle channel which governs/triggers data acquisition on all other muscles.
|
|
void | myosynReadInputs () |
| Global function to read all DAQ inputs in a synchronized manner. The results are put into the class objects of each muscle channel.
|
|
void | myosynWriteOutputs () |
| Global function to write all DAQ outputs in a synchronized manner. The results are put into the class objects of each muscle channel.
|
|
void | myosynWaitForClock () |
| This blocking function waits for the clock period to finish between two function calls. So, if the sampling period is 1ms, the second call of this function will block until 1ms has passed betwen two function calls.
|
|
◆ DEFAULT_MUSCLE_TONE
#define DEFAULT_MUSCLE_TONE 1.0 |
◆ DIGITAL_HIGH_VOLTS
#define DIGITAL_HIGH_VOLTS 5.0 |
◆ DIGITAL_LOW_VOLTS
#define DIGITAL_LOW_VOLTS 0.0 |
◆ eprintf
#define eprintf |
( |
|
_STR, |
|
|
|
... |
|
) |
| fprintf(ERRSTREAM, _STR, __VA_ARGS__) |
◆ LOADCELL_TARE_NSAMP
#define LOADCELL_TARE_NSAMP 100 |
◆ MAX_MUSCLE_TENSION
#define MAX_MUSCLE_TENSION 30.0 |
◆ MOTOR_SHAFT_DIAMTR
#define MOTOR_SHAFT_DIAMTR 6 |
◆ MYOSYN_H
◆ WIND_DOWN_VOLTS
#define WIND_DOWN_VOLTS 0.0 |
◆ WIND_UP_VOLTS
#define WIND_UP_VOLTS 0.8 |
◆ DAQarrangement
Enumerates the different types of configurations supported by myosyn.
◆ muscleStatus
This ENUM lists the possible statuses of each muscle channel.
◆ _DAQarrangement
Enumerates the different types of configurations supported by myosyn.
Enumerator |
---|
RING_OF_FIRE | |
QUADRUPED | |
MUSCLE_MODULE | |
Definition at line 22 of file myosyn.h.
◆ _muscleStatus
This ENUM lists the possible statuses of each muscle channel.
Enumerator |
---|
MYOSYN_DISABLED | |
MYOSYN_READY_WINDDOWN | |
MYOSYN_ENABLED_WINDUP | |
MYOSYN_CLOSEDLOOP | |
Definition at line 32 of file myosyn.h.
◆ myosynGetConfiguration()
◆ myosynGetLeaderChannel()
int myosynGetLeaderChannel |
( |
| ) |
|
Returns the leader muscle channel which governs/triggers data acquisition on all other muscles.
- Returns
- If successful, the postive/zero leader muscle channel number. Otherwise, a negative error code.
Definition at line 181 of file myosyn.cpp.
◆ myosynNumMuscles()
unsigned myosynNumMuscles |
( |
| ) |
|
Returns the number of muscles configured by the library.
- Returns
- Unsigned integer number of muscles.
Definition at line 117 of file myosyn.cpp.
◆ myosynReadInputs()
void myosynReadInputs |
( |
| ) |
|
Global function to read all DAQ inputs in a synchronized manner. The results are put into the class objects of each muscle channel.
Definition at line 191 of file myosyn.cpp.
◆ myosynSamplingRate()
Sets the sampling rate of the data acquisition and controller of all the muscle channels. The default rate is 1000Hz.
- Parameters
-
newSamplingRate | The global sampling rate of the DAQ subsystem. Cannot be overriden. |
- Returns
- If successful, returns the positive sampling rate that was set. Otherwise, it returns a negative error code.
Definition at line 136 of file myosyn.cpp.
◆ myosynSetConfiguration()
Set the muscle configuration/arrangement type of the library. List of possibilities in the DAQarrangement enum.
- Parameters
-
DAQconfiguration | The muscle configuration type (from the DAQarrangement enum) to which the library muscle be set. |
Definition at line 126 of file myosyn.cpp.
◆ myosynSetLeaderChannel()
void myosynSetLeaderChannel |
( |
int |
newLeader | ) |
|
Sets the leader/master muscle channel which governs/triggers data acquisition on all other muscles.
- Parameters
-
newLeader | The muscle channel which needs to be set as a leader. |
Definition at line 186 of file myosyn.cpp.
◆ myosynStart()
This routine starts the data acquisition on all muscle channels that haven't already been started so long as at least one channel has been configured.
Definition at line 146 of file myosyn.cpp.
◆ myosynStop()
This function sops the data acquisition of all muscle channels that were started (ie. active).
Definition at line 168 of file myosyn.cpp.
◆ myosynWaitForClock()
void myosynWaitForClock |
( |
| ) |
|
This blocking function waits for the clock period to finish between two function calls. So, if the sampling period is 1ms, the second call of this function will block until 1ms has passed betwen two function calls.
Definition at line 208 of file myosyn.cpp.
◆ myosynWriteOutputs()
void myosynWriteOutputs |
( |
| ) |
|
Global function to write all DAQ outputs in a synchronized manner. The results are put into the class objects of each muscle channel.
Definition at line 203 of file myosyn.cpp.
◆ loadcell_calib
double loadcell_calib[8][2] |
|
extern |
◆ mtr_trque_calib
double mtr_trque_calib[16][2] |
|
extern |
◆ muscle_enc_kleo
unsigned muscle_enc_kleo[8][2] |
|
extern |
◆ muscle_enc_mtr
unsigned muscle_enc_mtr[12][2] |
|
extern |
◆ muscle_enc_ring
unsigned muscle_enc_ring[8][2] |
|
extern |
◆ muscle_enc_spl
unsigned muscle_enc_spl[12][2] |
|
extern |
◆ muscle_ld_cell
unsigned muscle_ld_cell[8][2] |
|
extern |
◆ muscle_mtr_en
unsigned muscle_mtr_en[16][2] |
|
extern |
◆ muscle_mtr_val
unsigned muscle_mtr_val[16][2] |
|
extern |
◆ myosyn_samplingRate_global
double myosyn_samplingRate_global |
|
extern |
◆ myosynConfiguration
◆ myosynLeader
◆ numConfiguredMuscles
unsigned numConfiguredMuscles |
|
extern |