Hi it’s me again,
So I am at a point where I am trying to look at the status flags on each of 8 Tic controllers. I am using the serial code example shown on your website HERE .
I am using another function that calls that function and reads the bytearray output, converts it to a string and writes it to an html formatted text file
def get_all_status_flags(self):
b = self.get_variables(0x01, 8)
lstb = list(b)
error_flag = str(lstb)
return error_flag
function to write errorStatus file:
def errorStatus(self):
dataFile = ‘/var/www/html/Pantex/errorStatus.xml’
flag = tic.get_position_uncertain_flag()
if axis == 1:
f = open(dataFile, ‘w’)
f.write("" + “\n”)
f.write(" " + “\n”)
f.write(" axis" + str(axis) + “\n”)
f.write(" " + flag + “\n”)
f.write(" " + “\n”)
f.flush()
f.close()
Each Tic is called sequentially axis1, axis2, axis3…axis8 so I can see the flag values for each Tic Controller while they are are running. I “expected” something like: [1,0,0,1,0,0,0,0] , but I am getting rather different results.
In this particular run, all the axes were set with reverse limit switches (wired NC), on 1,2,3,4 had limit switches connected, 5,6,7,8 limit switches are not connected, so would appear as if the home limit switch was activated.
So I believe the first bit (0) reads 1 when running, except the 9 must mean a limit switch has been hit, bit 3 is showing 128 on all, this (I am guessing) means the limit switch is wired for reverse, not forward.
Anyway, is there a table that shows how to interpret the values. I’ve not seen it in the Tic user’s guide. If I understand teh method, I can see it being a powerful debug/error and status tool.
Thanks,
John