Industry Online Support
Technical Forum
2/27/2012 3:50 PM | |
Posts: 11 Rating:
|
Hi ScottDH, I've gone through thesteps below using a 1214 DCDCDC CPU. I'm not sure exactly what configuration you plan to use, but the process will be similar. After adding your PLC using the "Add new device" selection... Step 1: Determine the addresses of the analog input and discrete output you plan to use. In this example, I am using Analog Input 0 (IW64) and Discrete Output 0.0 (Q0.0) on the CPU. Step 2: Create PLC tags to reference these points. Step 3: Add appropriate logic to your Main function (or wherever you choose to put it) to set the discrete output when the analog input is a certain value. In this example I turn on the discrete output whenever the analog input is >= 5v. Because I see in the device configuration that the analog input ranges from 0 to 10 V, and the input is a WORD data type ranging from 0 to 65535 I use half of that or 32767 as = 5 V. Depending on your application you may need to alter this logic, but you get the idea. I've attached the following images to reference the 3 steps above. Hope this helps! AttachmentExample.zip (124 Downloads) |
Follow us on