Hi,
I have total 9 vibration wire sensors installed at a AM16/32 multiplexer thru CH1 to CH9, mux connected to CR6. CH1 to CH6 need to read/write hourly interval and CH7 to CH9 need to read/write1 minute interval. How can I change the following code, just to read only CH7 to CH9, starting channel should be from CH7. With the following code, I'm reading all nine channel every minute, I just need to read 3 gauge, starting from CH7. Can someone help it out?
PortSet(C2,1) Delay(0,150,mSec) Count=1 SubScan(0,uSec,Num_G) PulsePort(C1,10000) VibratingWire(VW(1),1,U1,1000,4000,1,0.01,"",60) Freq(Count)=VW(1) VW_G(Count)=Freq(Count)^2/1000 Count=Count+1 NextSubScan PortSet(C2,0) Delay(0,150,mSec)
Best regards,
Thein
hi
there are many ways to do it, a simple and intuitive way is this, if if the scan rate is already at one minute:
if iftime (0,60,min) then ' measure the first 6 probes only every hour
PortSet(C2,1)
Delay(0,150,mSec)
Count=1
SubScan(0,uSec,Num_G) ' n sub scan=6
PulsePort(C1,10000)
VibratingWire(VW(1),1,U1,1000,4000,1,0.01,"",60)
Freq(Count)=VW(1)
VW_G(Count)=Freq(Count)^2/1000
Count=Count+1
NextSubScan
PortSet(C2,0)
Delay(0,150,mSec)
endif
' next every minute
PortSet(C2,1)' enable the mux
Delay(0,150,mSec)
PulsePort(C1,10000)' move the measure to the first group without measuring
Delay(0,150,mSec)
PulsePort(C1,10000)' move the measure to the 2nd group
Delay(0,150,mSec)
PulsePort(C1,10000)' move the measure to the 3rd group
Delay(0,150,mSec)
PulsePort(C1,10000)
Delay(0,150,mSec)
PulsePort(C1,10000)
Delay(0,150,mSec)
PulsePort(C1,10000)' move the measure to the 6th group
Delay(0,150,mSec)
PulsePort(C1,10000)' move the measure to the 7th group of mux with the 7th VW
Delay(0,150,mSec)
VibratingWire(VW(7),1,U1,1000,4000,1,0.01,"",60)' measure the 7th vw
Freq(7)=VW(7)
VW_G(7)=Freq(7)^2/1000
PulsePort(C1,10000)
Delay(0,150,mSec)
VibratingWire(VW(8),1,U1,1000,4000,1,0.01,"",60) ' measure the 8th vw
Freq(8)=VW(8)
VW_G(8)=Freq(8)^2/1000
PulsePort(C1,10000)
Delay(0,150,mSec)
VibratingWire(VW(9),1,U1,1000,4000,1,0.01,"",60) ' measure the 9th vw
Freq(9)=VW(9)
VW_G(9)=Freq(9)^2/1000
PortSet(C2,0)' disable the mux
Delay(0,150,mSec)
......
some attention will have to be paid to the processing of historical data to correctly process, if necessary, the measurements taken every minute
regards
Smile
MuxSelect() could implify your program.
Hi Smile,
Thanks a lot for your detail explanations. I tried as you sugest, it does't work as it only reads the first sensor for the one min interval instructions given and all 9 readings are the same. Any way, thanks for your kind suggestions.
Hi JDavis,
Thanks a lot for your hint. Never used this instruction before, it works well, but what I did not understand is my first sensor is fixed of AM16/32A CH7, in order to read all this three senors, I have to declare starting channel as 6 instead of 7 stated in the explanation for MuxSelect() instruction. When you free could you please explain why like this. The working code is as below:
MuxSelect (C1,C2,150,6,0) ' 1st Snr at AM16/32A CH7 Count=1 SubScan(0,uSec,Num_G-6) 'Num_G = 9 PulsePort(C1,10000) VibratingWire(VW(1),1,U1,1000,4000,1,0.01,"",60) Freq(Count)=VW(1) VW_G(Count)=Freq(Count)^2/1000 Count=Count+1 NextSubScan PortSet(C2,0)
Best regards,
Thein