Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BrickAC BrickLV structure in C
Dear all,

What is the best and fastest method to read BrickLV and BrickAC status from C (BusOverVoltage, BusUnderVoltage, ...) ?

On PowerBrickLV (firmware, APM86xxx), asking "pshm->BrickLV.BusOverVoltage" always returns 1... so does not work.

BrickLV.BusOverVoltage is set at 1 when there is no power, in combinaison with BrickLV.BusUnderVoltage

I currently have a situation where i can be ClosedLoop without power on the BrickLV. I will get a FollowingError when i will ask for a move.
This is an element of an upper structure and must be properly "C-extracted". This structure is declared in "RtGpShm.h":
typedef struct BrickLv
int Config, Reset, Monitor;
int MonitorPeriod;
int BusOverVoltage,BusUnderVoltage, OverTemp;
unsigned char szVersion[32];
} BrickLv;

It might be easier to have a PLC copy the value into a "global" for easy C access.
Can you put an example how to properly "C-extract" this for future reference?
Actually, after looking into this in more detail, you will be able to access the structures as you have done:

I have verified that “BusOverVoltage” is not passed in C. I will check with the software group as to why.

Forum Jump:

Users browsing this thread: 1 Guest(s)