help with AT commands for current loop (cp x4h nema)

Using analog inputs I can get the voltage reading but how do i switch to the current loop?

Among my references is http://www.digi.com/wiki/developer/index.php/Dia_Config_AIO_Adapter

It says to set D8, D4, D6 and/or P0, D7, P2 to a value of 4 in order to enable the current loop.

one of the things i tried is this code:


zigbee.ddo_set_param(DESTINATION, 'D0', 2)
zigbee.ddo_set_param(DESTINATION, 'D1', 2)
zigbee.ddo_set_param(DESTINATION, 'D2', 2)
zigbee.ddo_set_param(DESTINATION, 'D3', 2)

zigbee.ddo_set_param(DESTINATION, "wr", "")
zigbee.ddo_set_param(DESTINATION, "ac", "")


zigbee.ddo_set_param(DESTINATION, 'P0', 4)
zigbee.ddo_set_param(DESTINATION, 'D7', 4)
zigbee.ddo_set_param(DESTINATION, 'P2', 4)


zigbee.ddo_set_param(DESTINATION, "wr", "")
zigbee.ddo_set_param(DESTINATION, "ac", "")

for this code i get some almost constant value on terminal 1 (pin 3 on the 14 pin plug of the connectport x4h). the value slightly fluctuates but independent of the actual input. for the 3 other terminals (pins 6, 9, and 12) i continue to get the voltage readings. another weird thing is that i’m not getting any current to flow.
i’m using an external source with about 5V and up to 30mA but the most current i can measure going through the “current loop” is hardly 1mA so that tells me that i’m doing something wrong.

any help is very much appreciated.

I don’t have the answer to your question, but I’ve hopefully put it in a better forum to get that question answered.

Are you sure that your application is starting? After power-up, the analog inputs may default to 0-10vdc, and so no current will flow until an application changes the settings to current loop.

Are you sure your wire connections are ok?

This may be of some help as well:
http://www.digi.com/wiki/developer/index.php/ConnectPort_X4H_Local_IO

As for how you’re reading these values, is this being done via iDigi Dia or some other python app? We have “local IO” drivers for each case, but they’d be different.

The standard drivers for this are the localain.py found within DigiXBeeDrivers.zip, which itself is part of the Python Drivers for XBee Adapters file: http://ftp1.digi.com/support/sampleapplications/40002640_B.zip

There’s also a script called analog_example.py, though this would need some modification since its written for the Analog IO XBee adapter, not the Analog IO on the X4 NEMA. iDigi Dia has built-in drivers for the X4 NEMA’s IO as well.