TJF1960 said:Thanks for the confirmation Lou. I thought perhaps I could webset var1 to the ISY but it looks like the isy will only allow 10 digits in a variable so that kind of shoots that down.
TJF1960 said:Thanks for the confirmation Lou. I thought perhaps I could webset var1 to the ISY but it looks like the isy will only allow 10 digits in a variable so that kind of shoots that down.
TJF1960 said:Oh, ok. Didn't realize ISY accepted 32 bit in. Am away from home now so can't try it first but if you send a 32 bit in to a ISY var. does the ISY show the decimal equiv. on the variable page?
My question may have come out wrong but that was the answer I was looking for.Lou Apo said:ISY will always display the numbers in decimal.
It seems to work perfectly... so far. Do you see any possible problems or concerns?If
$sWC5_IO_DataInput is not 0 # a state variable set by webcontrol webset
Then
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 1 # a integer variable used for computation only
$iWC5_Math /= 1
$iWC5_O1 = $iWC5_Math # iwc5_O1 variable for output 1 of webcontrol, O2 would be output 2
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 2
$iWC5_Math /= 2
$iWC5_O2 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 4
$iWC5_Math /= 4
$iWC5_O3 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 8
$iWC5_Math /= 8
$iWC5_O4 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 16
$iWC5_Math /= 16
$iWC5_O5 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 32
$iWC5_Math /= 32
$iWC5_O6 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 64
$iWC5_Math /= 64
$iWC5_O7 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 128
$iWC5_Math /= 128
$iWC5_O8 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 256
$iWC5_Math /= 256
$iWC5_I1 = $iWC5_Math # iWC5_I1 variable representing input1 of webcontrol, I2 would be input 2 etc
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 512
$iWC5_Math /= 512
$iWC5_I2 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 1024
$iWC5_Math /= 1024
$iWC5_I3 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 2048
$iWC5_Math /= 2048
$iWC5_I4 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 4096
$iWC5_Math /= 4096
$iWC5_I5 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 8192
$iWC5_Math /= 8192
$iWC5_I6 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 16384
$iWC5_Math /= 16384
$iWC5_I7 = $iWC5_Math
$iWC5_Math = $sWC5_IO_DataInput
$iWC5_Math &= 32768
$iWC5_Math /= 32768
$iWC5_I8 = $iWC5_Math
Else
- No Actions - (To add one, press 'Action')
TJF1960 said:Hello az1324,
Thank you for the suggestion, again. Can I ask under what conditions might it be -1?
Lou,
Just saw your edit. I do like to try and keep it resource light when I can. I had thought about it and the only reason I added the /2 /4 etc was to keep all the variables uniform 0 or 1. But of course you are right, all that matters is the variable is either 0 or not 0 so I will get rid of the extra steps. Thanks.
CAI,
4 of my 5 boards are 3.02.16c so they probably do not have the ALLOUTS function, or might they possibly?
If not how would be the best way to code this. Say I want to store all 8 outputs on VAR1 in order. I had a couple of examples I was going to post but I realized they didn't make sense so I deleted them. If you could provide one or two examples I could probably take it from there.
Thank you all so much.
I don't see why that would be true. ORB 0xFFFFFFFF 0 VAR1 should set VAR1 to -1.Lou Apo said:I don't think it can be negative in your context. The variable is set by CAI, and I don't believe there is anyway for bitwise logic to set the 32 bit (the sign bit) in CAI. Of course if you use something besides bitwise logic in CAI to establish the value of the variable, then it could be negative. You certainly can use "is 0 or is not 0", or for that matter you could say "is x or is not x" where x is any number at all.
PACKOPS:
ANDB VAR1 0xFFFFFF00 VAR1
ORB VAR1 OP1 VAR1
ROTL OP2 1 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP3 2 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP4 3 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP5 4 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP6 5 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP7 6 RAM1
ORB VAR1 RAM1 VAR1
ROTL OP8 7 RAM1
ORB VAR1 RAM1 VAR1
RET