User variables

9 years 4 months ago #29529155 by jetonski
User variables was created by jetonski
Using a VBL2350 with latest firmware. 2 related questions:

Question 1: Telemetry

Trying to setup a telemetry string to watch some variables in my script. It's easier to change the telemetry string to watch different variables at runtime than to modify and upload the script. The datasheet says that "Strings up to 48 char- acters long can be stored in this parameter." Any idea why the following would occur?

^tels "?VAR 1:?VAR 2:?VAR 3:#10"
+
^TELS "?VAR 1:?VAR 2:?VAR 3:?VAR 4:#10"
-

As I've written this, I've just read more detail on the Query History with automatic sending. Looks like a probable workaround. still, the behavior I'm seeing doesn't jive with the documentation.


Question 2: Serial queries

From the datasheet for VBL23xx:
Parameter Measure Point Min Typ Max Units
Integer Variables Internal 1024 Words (1)

I would assume that this means I safely can do the following in my microbasic script:
SetCommand(_VAR, 1, myVariable1)
SetCommand(_VAR, 1024, myVariable2)

When I try to query values via serial, I see the following:

?VAR 16
VAR=0
?VAR 17
-

It would seem that there are 16 custom variables available for use on this model? Or are only the first 16 available via Serial commands?
I'm confused about the documentation, and I'm concerned that writing to variable indeces over 16 in microbasic might overwrite memory that's not mine to write? But I have a more than 16 calculated values I'd like to monitor...

Thanks,
Jacob

Please Log in or Create an account to join the conversation.

9 years 4 months ago #29529156 by jetonski
Replied by jetonski on topic User variables
Marvelous what one learns from pressing return too quickly:

?var
VAR=0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

I assume I've answered question 2:
16 user variables?

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.051 seconds