Industry Online Support
Technical Forum
5/19/2012 4:59 PM | |
Joined: 6/4/2008 Last visit: 1/30/2025 Posts: 1511 Rating:
|
Hi Huggy, I am tearing out my hair here, I am so close, I can resolve any bit below the value of 4000H (16384), but with any values greater that the 16384, I get overflow errors (obvious as I'm guessing the Dim specifies an Integer) However, I can't find any other way to specify a variable with more capacity, if I use "Dim x As Float", then Starter Script does not recognise the "Float" or "Real" for that matter. I am using a mathematical reduction method to resolve each individual bit (I'm sure you will agree it is very clunky), but it works upto 16384 at least. For example . . . Counter = 16384 If (Counter = 32768 Or Counter > 32768) Then Bit_15 = 1 Result = Counter - 32768 Else: Bit_15 = 0 Result = Counter End If If (Counter = 16384 Or Counter > 16384) Then Bit_14 = 1 Result = Counter - 16384 Else: Bit_14 = 0 Result = Counter End If and so on cascading down to a final "MOD 10" for Bit 0. Clearly, I need to be able to resolve Bits 14 & 15. Any Ideas? p.s. I also tried a String Object that used the x.Position, but I lost the will to live I refer toLINK To be honest, I don't understand the function fully. EDIT: pps, I couldn't use the index as this is related to the parameter (those that have multiple indeces anyway), not the bit. For example, r968 (Status word) does not have an index (0), but it has 16 bits. Hope that makes sense Regards, Graeme AttachmentTrace.zip (250 Downloads) |
Last edited by: Blue Moderator at: 21.05.2012 08:07splitted from /tf/WW/en/Posts/74411 Last edited by: Graeme at: 5/19/2012 7:10 PM |
|
Follow us on