RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Automatically Start Logging when engine is running issue
Author Message
Reply with quote
Post Automatically Start Logging when engine is running issue 
I am trying to get the RCP to start logging automatically when the engine running by setting up a lab environment. I connected the RCP to my windows laptop and was able to get the application software connected. I installed the Lua script for subject function and then connected the +12V power to a variable DC power supply. When the RCP is running on USB the voltage is hovering around 4.6v as displayed on Battery display on App. I then switched on the power supply at 12v and saw the battery voltage change on the app, and the Green LED for logging to SD card was off. I then increased the voltage to 14v and verified it displayed same value on battery channel for app, but the green LED remained off. Why didn't the RCP start logging when the voltage exceeded the threshold of 13V in the Script.

Question: In the script should it read "If GetAnalog (7)" or GetAnalog (8 )? Should the last analog channel be scaled from 0-15 or leave it at 0-5 as the default.


_________________
Rocket 6706
View user's profile Send private message
Reply with quote
Post  
Hi,

Can you copy and paste your script here for review? We can take a look at it and see if there's anything amiss.

-Brent


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
here is what I have in script section. The behavior expected is battery voltage > 13 = green light flashing and data writing to SD card. What I get is Light off. I can press the button at both > and < 13 volts and it will start logging with flashing light. btw, I am a hardware (EE/ME) guy so this is all new to me.

function onTick()
if getAnalog(7) > 13 then
startLogging()
else
stopLogging()
end
end


_________________
Rocket 6706
View user's profile Send private message
Reply with quote
Post  
To debug try something simple that will output the current voltage value to the log. for example:



function onTick()
println(getAnalog(7))
end




This will show you the actual value being registered by RaceCapture/Pro under varying conditions. Yes, #7 is the battery voltage input.


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Mystery solved. I found an I/D-ten-t (IDIOT) failure on my part and eliminated a space in my code. All working and additional scripts added as,well.


_________________
Rocket 6706
View user's profile Send private message
Reply with quote
Post  
Have the same problem and actually I wonder, how is it possible that 7th analogue channel is used for the battery if the logging unit have 7 physical analogue inputs and I can map e.g. my temeperature sensor to analogue 7?

View user's profile Send private message
Reply with quote
Post  
Input 1 = analog 0
Input 2 = analog 1
Input 3 = analog 2

etc.

View user's profile Send private message
Reply with quote
Post  
So, in scripting the analog channels are zero based, so the first analog channel is 0, then 1, etc.

Channel 7 is the 8th channel, which is tied to battery voltage.

Hope this helps!


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum