8/26/2008 9:25 PM | |
Joined: 7/16/2006 Last visit: 1/2/2024 Posts: 1502 Rating: (176) |
Try read 1st analog Input (Slot 2) as 1 L PEW 256 2 L PEW 258 3 L PEW 260 4 L PEW 262 I hope, that is right |
Karl |
|
8/26/2008 10:34 PM | |
Posts: 196 Rating: (12) |
Hi ragundo You input and output on the ET200s is handled as normal input also called process image. Also be sure that the input is sleeted to OB1 PI and NOT PIP1. At the properties on you cpu you chose the cycle/tab memory here you can see the size of you process image.T he simple way to load the input is to A I0.0= m10.0As i understand it you would like to access you input indict, but why do so complicated ?? If you would like to use the input on you FB as a start parameter for out in put I suggests you try this. L 0 //startadress in int. ITD SLD 3 LAR1 // move the pointer in AR1 A I [AR1,P#0.0] = valeok The P#0.0 value can change in your program like P#0.2 get the status of I 0.2 Hope helps otherwise write again….. |
8/26/2008 11:54 PM | |
Joined: 7/18/2008 Last visit: 2/20/2023 Posts: 8 Rating: (0) |
This is my code in a FC: [code] OPN "DigitalInputs" L #ED_Logica // Logical input number SLD 5 // Displacement T #desp // Local variable L DBD [#desp] // Read pointer from table LAR1 A [AR1,P#0.0] // Access to physical input via interarea pointer = #RET_VAL // Return value to program [/code] As you see is very similar . When I need the value of a logical input, I call the FC and got the value of the physical input. So the ET200 inputs/outputs are mapped to the CPU inputs/outputs area. That makes sense and explains why thereisn't separate areas for peripheral input and outputs, only acces via byte/word/dword. Thanks for the tip in the CPU properties Greetings from Spain |
Follow us on