FX30 IOs API for legato

dear all, what is the API for controlling/reading the standard IOs for the FX30?
in legato I can find the gpioService but these are only for digital I/O while according to the manual IO2 can be set to an analogue input 0-10V, which is what we would need to setup.

have you tried “cm adc read xxx”?

https://docs.legato.io/latest/platformConstraintsAdc.html

that seems working, but how do you convert from the raw value?
i.e. I see when supplying the +Vin to EXT_ADC1 it goes up to 1700 but what is the scaling factor.
Also, there should be some way to setup the outputs to different settings (DI, DO, AI) so I assume there must be some sort of API for this purpose on the legato somewhere?

according to product technical spec, it is input only for ADC pin

only one of the three inputs can be setup as Analog input, the other are digital only, where one can also be setup as output.
Is there any API on how to setup the IOs accordingly and how to read from the inputs, with scaling factor included?

ADC1 is input according to WP77 PTS.

This is from the manual for the FX30, the inputs can be configured so the reason for asking which API allows to do so.

i don’t see there is scaling factor, according to the PTS, it’s range is 0-1.7V.

You can see more information here

to which GPIO`s number are these IO connected?

you can see here:
https://source.sierrawireless.com/resources/airlink/hardware_reference_docs/airlink_fx30_hw_user_guide/#sthash.BznCI3om.dpbs

I am having some troubles on setting up IO1, it seems I can only get this as NEGATIVE switching (GND) and not positive.
I have setup the GPIO as ACTIVE_LOW and enabling PULL UP resistor, IO3 is working as expected while IO1 is only working with GND switching, so to say is always TRUE and become FALSE only when the input is bridged to GND.

–>always TRUE and become FALSE only when the input is bridged to GND.

What is the problem then?
What do you expect actually?

I would expect it to be settable to positive switching (+Vin) and not only negative (GND).
This should be possible according to the manual:

image

I can get IO3 to switch ON/OFF with a positive signal (+Vin) but IO1 will only react to a negative signal (GND).
Hope this is clearer now.

What is io1 returning when it touches +Vin?

it doesn`t change status, it always stay to TRUE.

When it touches +vin, it returns true
When it touches ground, it returns false

What else do you expect

it touches Vin it return TRUE
it doesn`t touch Vin or GND it return TRUE
It touches GND it returns FALSE.

The in only reacts to the GND and not to Vin, do you see the problem?

if it doesn`t touch Vin or GND , what do you expect?
TRUE or FALSE?

If it return FALSE when not touching anything, will you say “The in only reacts to the Vin and not to GND”?

The logic status doesn`t really bothers me, as long as it changes status.
The input will not change status when Vin is connected or disconnect, it will only change status when the GNd is connected, this makes the pin as negative switching only.

If the input was to change status with Vin connected, if the value was either TRUE or FALSE I can still invert it in the logics, but if it doesn`t change at all, how do I know when a positive value is connected to the input?

Don`t know if I explained myself properly… :slight_smile:

If it return FALSE when not touching anything, will you ask " how do I know when a ground value is connected to the input?