--register private VIs
register.private_dir("C:/Documents and Settings/mesmith/Desktop/ALVIN 15 Jan 09/Scripting/Scriptable Vis")

print([[
******************************************************

starting Script

]])

-- example of OS function
time = os.time();
print("Current time (ticks) = ",time)
print()

-- example of Math function
sqrt_ticks = math.sqrt(time)
print("Square root of current time (ticks) = ", sqrt_ticks)
print()

-- example of I/O
-- open a file object
configFile = io.open("C:/Documents and Settings/mesmith/Desktop/ALVIN 15 Jan 09/Scripting/configFile.txt")

-- assign the contents to variables - we have three lines in the file
time1 = configFile:read()
time2 = configFile:read()
time3 = configFile:read()
configFile:close()

--call our scriptable VIs

-- example of control structure
result = true
-- if result is true, loop until false
while(result) do
print("calling test step one")
	result = test_step_one(time1)
end

print([[
Test Step One has failed - continuing
]])

print("calling test step two")
test_step_two(time2)

print("calling test step three")
test_step_three(time3)

-- end of script
