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

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

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

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

Remark2:
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.
Reply
#2
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];
BrickLvChan Chan[MAX_BRICKCHANEL];
} BrickLv;

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)