Hi Guys ,
I have need to do pulsin on a device that has 18 inputs connected to sensors the changes are generally large and updated every 2 mins. so basicly a status summery of the sensors is done

the code would be the same with only the array varable storing the change for each sensor

I thought using the nice method hendric showing of using lookup , with an port offset would work , but sadly not for pulsin as i am getting rubbish on readings which are above 15
, i think its cos the offset number from porta is larger value than 15 and pulsin has a value limit at 15 ????

Can anyone advise how to solve this prob with multi inputs with pulsin or am i incorrect ???


Cheers

Sheldon

Code:
Eg 

for T = 0 to 17

   lookup T [ 9,11,13,16,18,22,1,4,6,8,26,27,28,25,23,21,32,34], Portoffset  ' Sensor input 1 - 18
 
    pulsin PORTA.0[PortOffset],1,Leader

 Sensor(T) = Leader 

Next T