Q2406B adl_ioWrite problem (ADL_RET_ERR_UNKNOWN_HDL)


#1

Hi,

I am trying to write to a GIO port. (Q2406B, Open AT 3.10)

  1. I subscribe using

telemetryHandle = adl_ioSubscribe ( MaskForAPI, 0xFFFFFFFF, 0x00000000, IO_POLL_TIME, ioHandler );

telemetryHandle is assigned a positive value. (254)

  1. I try to write using

result = adl_ioWrite(telemetryHandle, ADL_IO_Q24X6_GPO_3, 0);

result is assigned ADL_RET_ERR_UNKNOWN_HDL, failing to change the output value.

I am confused since the documentation says, positive handle values are valid values. I am sure that ioWrite is given the correct value of telemetryHandle because I call it right after subscribing. Any ideas why this could happen?

Best Regards,
Yigit Erdal Bora


#2

The adl_ioSubscribe function returns type s8 value. The unsigned value 254 in fact reads as signed -2 or ADL_RET_ERR_PARAM error.

HTH.


#3

Thanks, the problem was that I interpreted the unsigned number wrongly. Still I got some more problems. Have you got skeletal code that makes io other than the sample telemetry code? (subscribes and changes an output value several times?) I have failed to do that despite many tries and delaying that part of the program until i find a solution:

wavecom.com/modules/movie/sc … .php?t=782

Best Regards,
Erdal