How to control PoCXP

Last modified by Lev Andronov on 2024/10/28 10:25

How to control PoCXP on CoaXPress extender over fiber

The PoCXP of the CoaXPress extender over Fiber can be controlled by a Frame Grabber.

To control the PoCXP, register 0x1000 should be written as BigEndian value, for each port individually, with one of the following options:

  • 0 = Off (always Off)
  • 1 = Auto (turn On when a camera is physically connected on a specific link)
  • 2 = force On (always On)

Attached is an example writing PoCXP control register 0x1000 using KAYA Frame Grabber API


/** CoaXPress over fiber extender - PoCXP control  **/
typedef enum
 {
POCXP_OFF = 0,
POCXP_AUTO = 0x01000000,
POCXP_ON = 0x02000000,
 }POCXP_REMOTE_CONTROL;

#include "KYFGLib.h"
#include <stdio.h>

// ==========================================
int main()
{
   int detectedDevices = 0;
   KY_DeviceScan(&detectedDevices);
   FGHANDLE fgHandle = KYFG_Open(0);
   if (fgHandle == -1)
    {
       printf("Bad connection to grabber\n\r");
       getchar();
    }
   else
    {
       printf("Good connection to grabber 0x%x\n\r", fgHandle);
    }

   static const uint64_t POCXP_REMOTE_CONTROL_ADDR = 0x1000;
   for(int fgPhysicalLink = 0; fgPhysicalLink < 4; ++fgPhysicalLink)
    {
       KYFG_WritePortReg(fgHandle, fgPhysicalLink ,POCXP_REMOTE_CONTROL_ADDR, POCXP_OFF);
    }

   Sleep(1000);

   for(int fgPhysicalLink = 0; fgPhysicalLink < 4; ++fgPhysicalLink)
    {
       KYFG_WritePortReg(fgHandle, fgPhysicalLink ,POCXP_REMOTE_CONTROL_ADDR, POCXP_AUTO);
    }

   KYFG_Close(fgHandle);

   return 0;
}
KAYA Instruments © 2024. All Rights Reserved.