Results 1 to 3 of 3

Thread: Input_analog help

  1. #1

    Default Input_analog help

    I am having a bit of a problem, I know its something simple but its got me stumped right now, and the manuals and documentation doesnt explain it well.

    I am using V2.3, with an ifm cr0232. I have an analog input from an ifm pressure sensor 4-20ma. I am trying to use the Input_Analog function block but I am not getting an output. I dont understand what Mode should be and what Channel this should be on. I am unable to put the analog input channel in the Channel field because it requires a byte and not a word input. I have tried, 07, 7, analog07, ect with no success.

    The sensor is hooked up to analog07_E which is analog 7 on the extended side of the controller. When I go to PLC configuration I can see the input, at 0 psi it is around 1000, if I change the configuration of the input from digital to current input in CONF_IO_CR0232_EX(PRG) the input drops to around 600, which is what I would expect with a 4-20ma signal at zero. But no matter what I try, I cant get that number to the Input_analog function block.


    Thanks,
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2010
    Posts
    29

    Default

    the mode should represent the bit-wise configuration of IXX_MODE (or IXX_MODE_E) for that channel. If you are using the template, you can see the assignments in CONF_IO_CR0232_EX(PRG). 4 is current in. you also need to use the block input_analog_e for the extended side inputs.

    (*DECLARATION*)
    in_current_mode:BYTE:=4;


    INPUT_ANALOG_E(
    ENABLE:=TRUE,
    MODE:=in_current_mode,
    CHANNEL:=7);

    Also, this block will output 20ma as 20000. so your norm block will need to be 4000 for 40ma, and 20000 for 20ma.

    I should also note that using this block automatically sets the IXX_MODE_E value accordingly.

    Tim

  3. #3

    Default

    Thank you that was exactly what I was looking for.

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •