Read Analog Input on a KR C2 edition 2005

  • Hello Guys, I'm setting up a KR C2 edition 2005 to read analog input.
    I'm a new and I'm experiencing some problem to get the correct value from the input.
    The controller has a WAGO 750-346 DeviceNet ECO FieldBus Coupler attached with 4 IO modules resulting in a 32 IO A/D interfaces.


    I've read the manuals and I have setup the configuration file IOSYS.INI like this:


    [DEVNET]
    ; Devicenet MACID 5
    ANIN1=5,0,16,1,CAL1


    If I send a 0-10V direct current to the analog input 1 (using a DV current generator) I can observe two things:
    1- The led on the Module glows changing it's luminosity as the current changes (by manipulating the current generator trigger, i.e. the current actually flows WAGO module)
    2- The value of the $ANIN[1] (observed by the "watch variable function" as like as the "analog display" variable of the "analog input/output view function") changes passing ISTANTLY from 0 to 10 (Volts since CAL1 is normalised as so) when the current I pass as input actually passes the threshold of ~9.0V (instead of gradually change from 0 to 10 through all the intermediate values)


    Any Ideas about this strange behaviour?


    Note: I've tried to change EVERY parameter of the config string and studied all parameters. :mad:
    - changing the justification
    - changing the resolution
    - changing the CAL value
    - changing the offset
    - changing the port (ANIN1,2,3)
    - I also commented out all other useless settings in the config files leaving only the minimal setup:
    i.e.



    [CONFIG]
    ;.. other drivers
    DEVNET=2,dnInit,dn2drv.o
    ;.. other drivers


    [SECTIONX]
    ; commented out config params


    [DEVNET]
    ; Devicenet MACID 5 (the only one I use)
    ANIN1=5,0,16,1,CAL1


    [SECTIONY]
    ; commented out config params

  • First off, I'm pretty sure the analog input LED on the Wago module should not be changing luminosity with the voltage of the input. Are you using a voltage source, or a current source? The latter is not going to give you good results. You also need to look at the input module type -- if it is intended to work with a potentiometer-type (two-wire) sensor, then the module is supposed to supply its own output current and feeding it an external voltage source is likely to give very bad readings, and quite possibly damage the module. The module documents should have, somewhere, a diagram for a basic test circuit that can be used to check its operation.


    The $ANINs can be a bit tricky, sometimes. I usually map the input digitally to a (in this case) 16-bit digital $IN block, and "reverse-engineer" the analog input by building a graph of the input voltage (tracked with a meter) vs the decimal value of the $IN block.

Advertising from our partners