Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

constant level in Vx during program run?


TaCaPica Mar 17, 2010 11:53 AM

Hi


I want to leave the Vx door excited in a known level during the execution of the program. In the forum, in other post's, I noticed that most of the solutions were to use the Delay function after ExciteV, locking the implementation of the program for a known interval of time. This is an unattractive solution for me. The program reads several sensors and is running in scans of 10 seconds

is there any way to make the port active port during execution of the program?

Const Speed1 = 100
Const Speed2 = 200
Const Speed3 = 300
Const PortBomba = 1
Const Stop = 0
Const Off = 0
Const On = 1

Public BattV
Public relogio(9)
Public TempCA, HRelCA
Public Speed
Public Bomba As Boolean


DataTable(Dados10m,True,-1)
DataInterval(0,10,Min,10)
Average (1,TempCA,FP2,False)
Maximum (1,TempCA,FP2,False,False)
Minimum (1,TempCA,FP2,False,False)
Average (1,HRelCA,FP2,False)
Maximum (1,HRelCA,FP2,False,False)
Minimum (1,HRelCA,FP2,False,False)
EndTable
BeginProg
Scan(10,Sec,1,0)
SequentialMode

Battery(BattV)
RealTime (relogio)

VoltSe(TempCA,1,mV2500,1,True,0,_60Hz,1.0,0)
VoltSe(HRelCA,1,mV2500,2,True,0,_60Hz,1.0,0)

If Bomba <> Off Then
PortSet(PortBomba,On)

If Speed >0 AND Speed < 25 Then ExciteV (Vx1,Speed1,100)
If Speed >=25 AND Speed < 50 Then ExciteV (Vx1,Speed2,100)
If Speed >= 50 Then ExciteV (Vx1,Speed3,100)
Else
PortSet(PortBomba,Off)
ExciteV (Vx1,Stop,100)
EndIf

CallTable (Dados10m)

NextScan
EndProg


Im changing the variable speed using RTMC.


aps Mar 17, 2010 12:56 PM

With the CR1000 (and similar generation loggers) you can turn on a voltage excitation and leave it on, up until the point an analogue measurement is made or the scan finishes. Even if you make an analogue measurement that does not change the excitation it will still get turned of momentarily during the measurement and return to the same setting afterwards.

This is because some of the same internal hardware is used between the switched excitations and the A/D hardware. This is by design as it lets the logger take truely ratiometric measurements relative to the excitation outputs.

If you want to set an analogue output to a given value and leave it there no matter what, you either need a variant of the dataloggers with a CAO (continuous analogue output) port, e.g. the CR3000, or add an extra peripheral such as the SDM-A04 or SDM-IO16.


TaCaPica Mar 17, 2010 02:40 PM

But when i change the scan rate for 30s (exemple) and put the delay time in the argument of the ExciteV function and just using the function in the end of the program, shoudn't it leave the Vx port in high mode during the rest of the run time?

i tryed this and the Vx port just has a pulse and fall to 0V almost instantly!


aps Mar 17, 2010 03:35 PM

The delay time has to be set to zero if you want to leave it on. It only stays on till the end of the scan, i.e. till every thing in the scan is done, after which the logger goes to sleep.

If you want to force it to stay on for as long as possible within 30 sec, you need to force a delay in the scan to extend the time the scan takes up till close to 30 s. The datalogger will stay in a relatively high power state for most of the time though.

Log in or register to post/reply in the forum.