Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sb

Pages: [1]
1
Support Questions / Re: Error writing to bit 31 of DINT
« on: January 26, 2016, 09:29:15 AM »
I removed my "fix" and tried yours and it works! I think I'll go with your version. Not fully understanding how the code works, I was worried that I might have broken something else with my fix.

Thanks for your help!

2
Support Questions / Re: Error writing to bit 31 of DINT
« on: January 25, 2016, 11:59:48 AM »
I think I found the error. Instead of:
Code: [Select]
If (Requests(TransactionByte)(0).AbreviatedDataType = &HD3 Or (Requests(TransactionByte)(0).BitNumber >= 0 And Requests(TransactionByte)(0).BitNumber < 65)) Then

Line 395 should be:
Code: [Select]
If (Requests(TransactionByte)(0).AbreviatedDataType = &HD3 Or (Requests(TransactionByte)(0).BitNumber > 0 And Requests(TransactionByte)(0).BitNumber < 65)) Then

Stepping through the logic, the value returned on Line 398 for bits 1 through 31 is "True" or "False". Bit 0 returns the value of the DINT (e.g. -2), which gets translated to a "True" when it returns to the MomentaryButton_MouseDown routine of the PilotLight.vb. Changing it from ">=" to ">" forces it to convert the value to bits when BitNumber = 0. Making this code change has fixed the errors.

3
Support Questions / Re: Error writing to bit 31 of DINT
« on: January 25, 2016, 10:17:51 AM »
Thanks! That fix does allow bit 31 to be toggled ON and OFF. There is now a new issue where as long as the DINT value is 0, bit 0 can be toggled ON and OFF. But, if the DINT value is not 0, bit 0 cannot be toggled ON. However, it can be toggled OFF if it was already ON. Previously, this issue did not exist.

4
Support Questions / Error writing to bit 31 of DINT
« on: January 21, 2016, 05:16:25 PM »
I am using version 3.99a of AdvancedHMI and I have a pilot light that toggles the bits of a DINT array on ControlLogix. It is able to display the status of all of the bits (0-31), but when writing to bit 31 of each DINT,  I receive a message that says "WRITE FAILED! Input string was not in a correct format."

For instance, I can write to bits Output[0].0 through Output[0].30 or Output[1].0 through Output[1].30, but it fails to write to Output[1].31 and Output[1].31. I did a test and the same is true for bit 31 of a DINT (i.e. Output.31). Solution?

Thanks.

Pages: [1]