Hi everyone
I'm wondering if it is possible to use a public variable to set a name for a data table. I tried whipping up the code found below but when compiling I get the following error: line 1: Warning: DataTableName declared but not used.
And of course when uploading to a logger the name of the data table is "DataTableName" but not "TEST" as I would like it to be.
Am I doing something wrong programming wise, or is this just not possible?
Public DataTableName = "TEST" Public BatteryV DataTable (DataTableName, 1, -1) DataInterval (0, 15, Sec, 10) Sample (1, BatteryV, FP2, 0) EndTable BeginProg Scan (1,Sec,0,0) Battery(BatteryV) CallTable DataTableName NextScan EndProg
The data table structures need to be constant, including the table name.
Dear JDavis, thank you very much! Changing from a Public (variable) to a Const (constant) when defining variables worked as expected.
See following code for reference
Const DataTableName = "TEST" Public BatteryV DataTable (DataTableName, 1, -1) DataInterval (0, 15, Sec, 10) Sample (1, BatteryV, FP2, 0) EndTable BeginProg Scan (1,Sec,0,0) Battery(BatteryV) CallTable DataTableName NextScan EndProg