rec::robotino::api2 C interface
Macros | Typedefs | Functions
CompactBHA.h File Reference

In "rec/robotino/api2/c/CompactBHA.h" you can find functions for controlling Robotino's compactBHA. More...

#include "rec/robotino/api2/c/globals.h"
#include "rec/robotino/api2/c/Com.h"

Go to the source code of this file.

Macros

#define INVALID_COMPACTBHAID   -1
 

Typedefs

typedef int CompactBHAId
 

Functions

DLLEXPORT CompactBHAId CompactBHA_construct ()
 
DLLEXPORT BOOL CompactBHA_destroy (CompactBHAId id)
 
DLLEXPORT BOOL CompactBHA_setComId (CompactBHAId id, ComId comId)
 
DLLEXPORT BOOL CompactBHA_setPressures (CompactBHAId id, const float *pressures)
 
DLLEXPORT BOOL CompactBHA_setCompressorsEnabled (CompactBHAId id, BOOL enabled)
 
DLLEXPORT BOOL CompactBHA_setWaterDrainValve (CompactBHAId id, BOOL open)
 
DLLEXPORT BOOL CompactBHA_setGripperValve1 (CompactBHAId id, BOOL open)
 
DLLEXPORT BOOL CompactBHA_setGripperValve2 (CompactBHAId id, BOOL open)
 
DLLEXPORT BOOL CompactBHA_pressures (CompactBHAId id, float *readings)
 
DLLEXPORT BOOL CompactBHA_pressureSensor (CompactBHAId id)
 
DLLEXPORT BOOL CompactBHA_stringPots (CompactBHAId id, float *readings)
 
DLLEXPORT float CompactBHA_foilPot (CompactBHAId id)
 

Detailed Description

In "rec/robotino/api2/c/CompactBHA.h" you can find functions for controlling Robotino's compactBHA.

Use CompactBHA_construct() to create a new compactBHA object. Associate the compactBHA object with a com object using CompactBHA_setComId(). Use CompactBHA_setAxis() to drive one axis to the desired position. Use CompactBHA_getReadings() to get sensor readings from Robotino's compactBHA.

Macro Definition Documentation

#define INVALID_COMPACTBHAID   -1

Invalid CompactBHAId is -1

Typedef Documentation

typedef int CompactBHAId

CompactBHAId

Function Documentation

DLLEXPORT CompactBHAId CompactBHA_construct ( )

Construct an CompactBHA object

Returns
Returns the ID of the newly constructed CompactBHA object.
DLLEXPORT BOOL CompactBHA_destroy ( CompactBHAId  id)

Destroy the CompactBHA object assigned to id

Parameters
idThe id of the CompactBHA object to be destroyed
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT float CompactBHA_foilPot ( CompactBHAId  id)

Read foil potentiometers

Parameters
idThe CompactBHA id.
Returns
Returns the current reading from the foil pot. Returns 0 if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_pressures ( CompactBHAId  id,
float *  readings 
)

Read current pressure of all bellows

Parameters
idThe CompactBHA id.
[out]readingsArray of pressures in bar. Size of this array must be 8.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_pressureSensor ( CompactBHAId  id)

Read pressure sensor

Parameters
idThe CompactBHA id.
Returns
Returns the signal from the pressure sensor. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setComId ( CompactBHAId  id,
ComId  comId 
)

Associated an CompactBHA object with a communication interface, i.e. binding the CompactBHA to a specific Robotino

Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setCompressorsEnabled ( CompactBHAId  id,
BOOL  enabled 
)

Turns compressors on and off. If on, they do only run when pressure is too low.

Parameters
idThe CompactBHA id.
enabledState of compressors.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setGripperValve1 ( CompactBHAId  id,
BOOL  open 
)

Opens and closes the gripper valve 1.

Parameters
idThe CompactBHA id.
openState of the valve.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setGripperValve2 ( CompactBHAId  id,
BOOL  open 
)

Opens and closes the gripper valve 2.

Parameters
idThe CompactBHA id.
openState of the valve.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setPressures ( CompactBHAId  id,
const float *  pressures 
)

Sets pressure of all bellows

Parameters
idThe CompactBHA id.
pressuresArray of pressures in bar. Size of this array must be 8.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_setWaterDrainValve ( CompactBHAId  id,
BOOL  open 
)

Opens and closes the water drain valve.

Parameters
idThe CompactBHA id.
openState of the valve.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.
DLLEXPORT BOOL CompactBHA_stringPots ( CompactBHAId  id,
float *  readings 
)

Read string potentiometers

Parameters
idThe CompactBHA id.
[out]readingsArray of readings. Size of this array must be 6.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given CompactBHAId is invalid.