Rachel
-
Posts
10 -
Joined
-
Last visited
Posts posted by Rachel
-
-
I'm writing a sequence to check whether the user inputted a valid input in the edit box component. I want it to be an integer. When I do strtodouble("123abc"), I get 123 instead of NaN. Which function should I use to get NaN or to figure out that the input does indeed have text in it?
-
My problem has been solved! For configuration from DAQFactory to Postgresql, in the Logging set settings, I had to input FLOAT8 as the DATE variable type in SQL settings, and change the time setting from Custom to DAQFactory Time. Thank you for all your help!
-
Haha my bad, thank you so much! I was able to input the numeric.
Now I'm trying to input the date and time into a column in my table (column is called "thetime" and it is of type: time without time zone). DAQFactory logs date and time (for example, 6/16/2022 16:10) but I'm not sure how to access it.
I tried datetimes = File.ReadDelim(FileHandle,0,",",chr(10),0) but this just gives me an array with only the first value of each of the dates: {6, 6, 6, 6, 6}.
And after adding that line of code, pressureVals = File.ReadDelim(FileHandle,1,",",chr(10),0) does not work as I would like it to anymore. When I print printVals, an empty line is printed rather than an array of values.
Thanks for all your help!
-
Do you have any suggestions on how to keep the original data type while still being able to write the data to my database? Thanks!
-
I fixed it by first parsing my sql string and then using the sql string in my Execute function. However, now my value is a string.
global string sqlquery
sql_query = "INSERT INTO public.pressure_table_01 (pressure) VALUES (" + DoubleToStr(val) + ");"
db.Execute(dbase,sql_query) -
-
How do I check this?
-
Thank you! When I clicked Test, the connection worked. I had the wrong version installed, but now I have the 32 bit version. I tried global dbase = db.open("DAQFactory") but an error popped up and I'm not sure why. The error: 01002 Unable to open ODBC database: Line 1
-
I would like to automatically log data from DAQFactory to a database in PostgreSQL. I followed this website to configure an ODBC driver for PostgreSQL. Then I created an Export Set and changed the settings so that it uses ODBC Database as Export Method. What are the next steps? I am completely new to these platforms so any help is much appreciated! Thanks!
Valid Input Type
in Sequences and scripting
Posted
I see your point, thanks! However, I'm having trouble obtaining the original value from the edit box component. For example, suppose my box is called userInput. I type "123abc" into the box, and I run private string datain = userInput. Printing datain gives me "123" instead of "123abc". Is there a way to access this "123abc" raw input before evaluation to "123"?