Good afternoon,
I have a code to connect two anemometers (014A) to a Datalogger (CR310). Additionally, I want to connect a Multiplexer with two thermistors (107). Theoretically this is not very difficult, but I think I am not sure how the wiring of the sensors 107 to the Multiplexer is. I enclose the code. What I don't know is the wiring of the thermistors.
I would appreciate any help please.
Units PTemp=Deg c
'Definicion de tablas de datos
DataTable(Table1,True,-1)
DataInterval(0,60,Min,0)
Sample(1,WS_ms_1,FP2)
Sample(1,WS_ms_2,FP2)
EndTable
'Programa principal
BeginProg
Scan(30,Sec,1,0)
'Lectura del voltaje de la bateria del datalogger
Battery(Batt_Volt)
PanelTemp(Ptemp,60)
'014A Sensor de Velocidad de Viento 1
PulseCount(WS_ms_1,1,P_SW,2,1,0.8,0.447)
If WS_ms_1 < 0.457 Then WS_ms_1 = 0
'014A Sensor de Velocidad de Viento 2
PulseCount(WS_ms_2,1,C2,2,1,0.8,0.447)
If WS_ms_2 < 0.457 Then WS_ms_2 = 0
'Encender el multiplexor AM16/32B
PortSet(VX2,1)
SubScan(0,uSec,1)
'Siguiente canal
PulsePort(C1,10000)
'Agregar mediciones de sensores
'Para pasar de canal poner nuevamente PulsePort(C1,10000) y debajo la instruccion de medicion del sensor a leer
NextSubScan
'Apagar el multiplexor AM16/32B
PortSet(VX2,0)
'Llamado de tablas
CallTable(Table1)
NextScan
EndProg
Sorry, but why a multiplexer for only 2 probes 107?
you can connect them directly to the logger, you have enough free channels.
add these 2 lines + the necessary processing in the datatable
Public temp107(2)
.....
Therm107 (Temp107,2,1,Vx1,0,50,1.0,0)
As far as I know, you can't use a multiplexer with CR3xx series of dataloggers (not enough control ports).
Dear Uri,
also I have only recently discovered that all channels in the CR300 can become digital ports.
From CS web page:
"7 terminals (C1, C2, P_SW, and SE1 to SE4) configurable for digital input and output. Includes status high / low, pulse width modulation, external interrupt, and communication functions. Exception: The SE4 terminal doesn ' t do external interrupt. "
Smile