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.

CR200 Get Value


PPeters Sep 24, 2009 02:46 AM

I have run into a problem with attempting to pass collect data from a cr200 using another cr200

the code is
GetValue (Response_104672,RC_104672(),3,Data(),1,2,2,00000)

I want to retrieve and stroe an array of 3 numbers
the setup was working correctly when I was just collecting 1 data value but now that I am trying to retrieve an array i am getting a complier error

"invalid or out of place expression..
followed by "invalid or missing parameter"

is the is correct application of the code for cr200 to cr200 data retrieval?

The help file seems to imply that it is possible

cheers


jra Sep 24, 2009 01:09 PM

In your GetValue instruction try changing the remote variable parameter Data() to "Data" with the quotes.

Let us know if that works.
Regards,
Janet


PPeters Sep 25, 2009 04:24 AM

tried the suggestions "Data" as well as "Data()"
Both examples compiled ok but it appears that the variable is identified as a string

testing showed that communication to the remote logger was successful but an error response -16 was reported (Response received but RemoteVar does not exist)

Any further suggestions?
this code is appropriate for cr200 to cr200 communication?

cheers


Dana Sep 25, 2009 05:55 PM

Hello -- Have you tried using the specific array index? (e.g., Data(1) with a swath of 3).

Just to double-check, the value you are attempting to get is from the public table, correct?

Regards, Dana


jra Sep 25, 2009 09:20 PM

Okay, I rounded up some hardware (thanks Dana :)) and tested; it works. I used RS-232 to RS-232 via a null modem cable for my communications.

Here are the pertinent instructions:
Receiving logger:
Public rx_data(3), response
GetValue (response,rx_data(),3,"data",2,2,2,00000)

Remote logger:
Public data(3)

What Operating Systems are running in your CR200s?

I'd be happy to test your programs here. You can e-mail a copy to me at training [at] campbellsci.com

Regards,
Janet


lespedeza Sep 28, 2009 02:45 PM

I've used this for CR2xx to CR2xx communication over RF. So, I can confirm that it works fine over RF as well.

This is the code I've used on the receiving logger.

GetValue(DischargeStatus, DischargeStage,1,MyStageAvg,1,66,66,0)

Remote logger just has to have the Public variable with the correct name (in this case MyStageAvg).

I haven't tried it with a swath greater than 1 though, so can't confirm if that might be causing the problem.

I've got OS6 installed on both loggers. I haven't upgraded these to 7 yet.

I'll give it a try with more than one value to see if I can get it to work.

UPDATE:

I tested it with a swath of 3 over RF and it works fine...here's the updated instruction

GetValue(DischargeStatus3,RecTest,3,Test,1,66,66,0).

RecTest is declared with

Public RecTest(3) on the receiving logger and

Test is declared with

Public Test(3) on the remote logger.

* Last updated by: lespedeza on 9/28/2009 @ 9:14 AM *


PPeters Sep 28, 2009 07:27 PM

Thanks for all the help
tracked the problem i was having to two issues

first was in the get statement with the array variable "Data" resolved.

next was in the remote logger, I was Aliasing the variables.
I removed the alias reference and it all works fine

Tried a couple of iterations on the aliasing with no success
this is what I had

remote logger
Public RC_104672(3)
Alias RC_104672(1) = RC_104672_Total
Alias RC_104672(2) = batt_volt
Alias RC_104672(3) = Version

getvalue calls for "RC_104672"

This is the same format I use successfully on other cr200's with a 10xPB & 410 as the requester

I am running the new version 7 firmware on the new system and not sure on the deployed.

regards

Paul

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