You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old September 18th, 2023, 09:27 PM   #1
James Mcquade
United States

James Mcquade is offline
Join Date: Oct 2007
Location: Nashville, Tennessee area
Posts: 3,545
Omron Mad42 analog card

Hi all,

i was trying to learn the analog card and got pulled off.
now i am asking for your help again.
this is what i have.
all i/o are enabled and set for 0 - 10 volts
all i/o conversion numbers are 0 and 4096
all i/o voltage settings are 0 - 5 volts.

analog 3 input is connected and i can see the data changing in the data viewer screen. the input is connected to an ultrasonic sensor.
at 13" i get an input of 0.067 volts and d102 reads 25
at 6 1/2" i get an input voltage of 9.52 volts and d102 reads 3830.

what i want to do is scale the output to read 0 to 6"

i copied a function block with parameters from another program, but could not figure out how to put in the data numbers.

i also want to scale the data with another instance of the function block that will output 0 - 21 cm for example.

i have looked at youtube videos and i must admit that this is one item that is getting the best of me. omron digital i/o programming is no issue, but the analog,rtd, and thermocouple logic is getting the best of me.

if someone would look at my code and help, i would be ever grateful. any comments and explainations would be appreciated.
thanks in advance.
Attached Files
File Type: zip (9.2 KB, 2 views)
  Reply With Quote
Old September 19th, 2023, 12:14 AM   #2

chelton is offline
Join Date: Jan 2012
Location: melbourne
Posts: 276
Screenshot shows scaling using the “APR” instruction scaled from 0-13000 in binary (implied zeroes)
  Reply With Quote
Old September 19th, 2023, 07:35 AM   #3
United States

IO_Rack is offline
IO_Rack's Avatar
Join Date: Aug 2003
Posts: 135
From the menu, choose Insert > Function Block Invocation...

That one got me as well.
  Reply With Quote
Old September 19th, 2023, 07:50 AM   #4
United States

IO_Rack is offline
IO_Rack's Avatar
Join Date: Aug 2003
Posts: 135
As a note, or clarification, the function block is a template. I would call it ScaleWithParameters or something like that. The Instance you create in ladder will need a unique name like Hot_Water_LVL to be a more specific description of your process.

For each parameter in the instance of your function block, you'll need to choose Insert > Function Block Parameter... I'm not sure why they don't allow a double click to do this.

Last edited by IO_Rack; September 19th, 2023 at 07:53 AM.
  Reply With Quote
Jump to Live PLC Question and Answer Forum

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Omron CJ2M and MAD42 analog card help James Mcquade LIVE PLC Questions And Answers 26 August 21st, 2023 05:16 PM
AB Micro850 analog output card issue sjacobjf LIVE PLC Questions And Answers 15 July 20th, 2021 12:22 PM
Analog card for Thermocouple TMcDaniel LIVE PLC Questions And Answers 4 June 3rd, 2020 04:38 PM
Help with AB 1771 analog input card sparkytex LIVE PLC Questions And Answers 3 October 7th, 2019 03:23 PM
Initialization analog input/outpu card AB danijel LIVE PLC Questions And Answers 0 February 21st, 2008 11:04 AM

All times are GMT -4. The time now is 09:20 PM.