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
新对话如下:
In your GetValue instruction try changing the remote variable parameter Data() to "Data" with the quotes.
Let us know if that works.
Regards,
Janet
新对话如下:
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
新对话如下:
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
新对话如下:
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
新对话如下:
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 *
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
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.