EasyManua.ls Logo

LabJack U12 - Page 55

LabJack U12
61 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Command
Byte #
Description
0
XXXXXXXX
1
XXXXXXXX
2
XXXXXXXX
3
XXXXXXXX
4
XXXXXXXX
5
01X1XX00 (Read RAM)
6
Most Significant Address Byte
7
Least Significant Address Byte
Response
Byte #
Description
0
01010000
1
Readback of data byte 3
2
Readback of data byte 2
3
Readback of data byte 1
4
Readback of data byte 0
5
XXXXXXXX
6
Most Significant Address Byte
7
Least Significant Address Byte
Non-Volatile RAM Map
Address Range
Description
0x00
A copy of the serial # which is stored in ROM
0x08 - 0x0A
Always 0
0x0B
LocalID
0x0C
wdoglj (Watchdog Variable)
0x0D
wdogtoh (Watchdog Variable)
0x0E
wdogtol (Watchdog Variable)
0x070
fullA (Asynch Variable)
0x071
fullB (Asynch Variable)
0x072
fullC (Asynch Variable)
0x073
halfA (Asynch Variable)
0x074
halfB (Asynch Variable)
0x075
halfC (Asynch Variable)
0x076
tomult (Asynch Variable)
0x080 - 0x0BF
Serial data send buffer (64 bytes, 28 used)
0x0C0 - 0x0FF
Serial data receive buffer (64 bytes, 28 used)
0x1C0 - 0x1DF
Serial data buffer (32 bytes)
0x200 - 0x3FF
User area
0x400 - 0x1FFF
Circular RAM buffer.
LabJackPython Example
>>> import u12
>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> r = d.rawReadRAM()
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0]
Received: [0x50, 0x5, 0xf6, 0x8b, 0xaa, 0x0, 0x0, 0x0]
>>> print r
{'DataByte3': 5, 'DataByte2': 246, 'DataByte1': 139, 'DataByte0': 170}
>>> bytes = [ r['DataByte3'], r['DataByte2'], r['DataByte1'], r['DataByte0'] ]
>>> import struct
>>> print struct.unpack(">I", struct.pack("BBBB", *bytes))[0]
100043690
5.12 - Write RAM
Writes 4 bytes to the U12s internal memory.
55

Other manuals for LabJack U12