Quote:
================================================== ============================
' One log record
voltage con 0 ' byte
amps CON voltage+1 ' word (amps is 1 byte away from voltage)
drive CON amps+2 ' word (drive is 2 bytes away from amps)
climit con drive+2 ' word
stat con climit+2 ' byte
szLog con stat+1
DataLog var byte[szLog] ' reserve the bytes for structure
method and ext var declarations is fine up until you need to have a mixed array with bytes and word vars and more than One log record that you can step through to read and write in a loop.
Quote:
ready v2
fetched a word 5139
fetched a byte 24
fetched put word 1234
fetched put byte 56
array byte to any byte 8
array word to any word 3083
any array byte to any byte 44
any array word to any word 11308
array variable byte to any byte 8
array variable word to any word 3083
any array variable byte to any byte 44
any array variable word to any word 11308
Battery V A PWM
0 0 0201 0403
1 8 0A09 0C0B
2 16 1211 04D2
3 56 1A19 1C1B
4 32 2221 2423
5 40 2A29 2C2B
6 48 3231 3433
7 56 3A39 3C3B
8 64 4241 4443
9 72 4A49 4C4B