AnthonyLH Posted September 1, 2016 Share Posted September 1, 2016 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. Link to comment Share on other sites More sharing options...
steve.milici Posted September 6, 2016 Share Posted September 6, 2016 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. Link to comment Share on other sites More sharing options...
bradp Posted September 7, 2016 Share Posted September 7, 2016 Can you put an example how to properly "C-extract" this for future reference? Link to comment Share on other sites More sharing options...
steve.milici Posted September 8, 2016 Share Posted September 8, 2016 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. Link to comment Share on other sites More sharing options...
Recommended Posts