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.

SendVariables question


IslandMan Jan 10, 2017 04:59 PM

Is it possible to send a miltidimensional array with SendVariables?

I need to send these variables to a second datalogger at a site and can't seem to sort it out.

Thanks,

Dave

Alias DataIn(9,1) = Booster_PumpFail
Alias DataIn(9,2) = Booster_LowLevelAlarm
Alias DataIn(9,3) = Booster_Batt
Alias DataIn(9,4) = Booster_BattDoor '0 = Open, 1 = Closed
Alias DataIn(9,5) = Booster_LogrDoor '0 = Open, 1 = Closed
Alias DataIn(9,6) = Booster_HighLevelAlarm
Alias DataIn(9,7) = Booster_Start
Alias DataIn(9,8) = Booster_WaterLevel
Alias DataIn(9,9) = Booster_ACpwr '0 = None, 1 = AC
Alias DataIn(9,10) = Booster_Chg_State '-1=RegFault,0=NoChg,1=CurrLmt,2=Cycle,3=Float,4=BattMast
Alias DataIn(9,11) = Booster_Ck_Batt '0=normal, 1=check battery
Alias DataIn(9,12) = Booster_LogrTmp
Alias DataIn(9,13) = Booster_WaterPressure


jra Jan 10, 2017 05:45 PM

Dave, Have you tried DataIn(117) as the starting variable and a swath of 15 in the SendVariables() instruction? Those are the last 2 parameters. 117 (if I've done the math right) is the index into the array, the first value of the 9th row where each row consists of 13 values. 

1    2    3    4    5   6    7    8   9   10   11  12  13  

14  15  16  17  18  19  20  21  22  23  24  25  26

...

117  118  119  120, etc. 


IslandMan Jan 10, 2017 07:22 PM

Hi Janet,

The start of the 9th set would be 105, no? 13 * 8 + 1.

Declaration is Public DataIn(16,13)

In any case, I have tried Getvariables in the receiving logger and SendVariables but neither work with the suggestion.

SendVariables (WTPRxResult,Com3,0,916,0,0,"Public","Booster_Data()","DataIn(105)",13)

I'll assign the data into a single array and try that.

Thanks,

Dave


jra Jan 11, 2017 09:23 PM

Dave, 

You're right, 105 not 117. 

Any progress? What are you getting in the WTPRxResult variable? 

Janet


IslandMan Jan 11, 2017 11:53 PM

Hi Janet,

For some reason, I could not get SendVariables to work on the "base" logger but it's 1529 lines of code. Could never see the data in the remote logger, despite the 0 in the WTPRxResult. I trapped the communictions on the port and looked at it with LogView and it looked ok to me, but then I'm no PacBus expert either.

I used get variables in the other logger and it works fine.

Thanks,

Dave


jra Jan 12, 2017 03:24 PM

Dave,

Glad you got it working. Not sure why the Result would be 0 but no values in the receiving logger. If you want to pursue this, send me a copy of your programs and I'll take a look. 

Janet


JamesMc Jan 20, 2017 07:56 PM

For some reason, I could not get SendVariables to work on the "base" logger but it's 1529 lines of code. Could never see the data in the remote logger, despite the 0 in the WTPRxResult. I trapped the communictions on the port and looked at it with LogView and it looked ok to me, but then I'm no PacBus expert either.

I used get variables in the other logger and it works fine.

I had this problem once.  Turned out that I had "quotes" around the variable name.  Compiles and runs, but won't send any data.


IslandMan Jan 23, 2017 01:29 PM

Hi James,

I think I see the error:

SendVariables (WTPRxResult,Com3,0,916,0,0,"Public","Booster_Data()","DataIn(105)",13)

"DataIn(105)" should not have quotes, correct?

Thanks,

Dave

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