how to look at binary variables

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

how to look at binary variables

Marty Billingsley-2
Hi all --

In order to poll a certain device that's on a serial port, I'm supposed to
send it a single byte containing the number 1.  To me, that means
00000001.  How do I put that into a variable and send the variable to the
device?

The documenatation for binaryEncode() and binaryDecode() is confusing me.
If I put binaryEncode("C1",1) into a variable, that should do it, right?
How can I see what's really in the variable, how big it is, etc.?

Also, I'll be reading bytes back from the device, and want to look at them
bit by bit.  How can I do that?

Any pointers would be appreciated!

Thanks,
  - marty

--
Marty Billingsley
The University of Chicago Laboratory Schools

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: how to look at binary variables

masmit
The simplest way is:

put numToChar(1) into tByte

this way, tByte is a single byte with the value 0x00000001

For reading the individual bits of returned values, you can use the  
'b' or 'B' format of the binaryDecode function, which will give you  
strings of 1's and 0's.

Best,

Mark


On 26 May 2008, at 23:19, [hidden email] wrote:

> Hi all --
>
> In order to poll a certain device that's on a serial port, I'm  
> supposed to
> send it a single byte containing the number 1.  To me, that means
> 00000001.  How do I put that into a variable and send the variable  
> to the
> device?
>
> The documenatation for binaryEncode() and binaryDecode() is  
> confusing me.
> If I put binaryEncode("C1",1) into a variable, that should do it,  
> right?
> How can I see what's really in the variable, how big it is, etc.?
>
> Also, I'll be reading bytes back from the device, and want to look  
> at them
> bit by bit.  How can I do that?
>
> Any pointers would be appreciated!
>
> Thanks,
>   - marty
>
> --
> Marty Billingsley
> The University of Chicago Laboratory Schools
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
JB
Reply | Threaded
Open this post in threaded view
|

Rev Online - Quit

JB
I just went to Rev Online and see they have it back up
and working.

After quitting Rev Online I decided to quit Rev and it
would not quit.  I then used quit from the Rev menu &
it would not quit so I used Force Quit.  I am on a Mac.

I started Rev up again and then it Quit properly.

I don't know if it had anything to do with Rev Online
but that is the sequence of events and the problem
with quitting I had.  I also use GXL2 script editor and
every time I tried to quit it would save the settings so
it did go though a small process of quitting.

-=>JB<=-
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Rev Online - Quit

Sarah Reichelt-2
On Thu, May 29, 2008 at 4:41 AM, -= JB =- <[hidden email]> wrote:

> I just went to Rev Online and see they have it back up
> and working.
>
> After quitting Rev Online I decided to quit Rev and it
> would not quit.  I then used quit from the Rev menu &
> it would not quit so I used Force Quit.  I am on a Mac.
>
> I started Rev up again and then it Quit properly.
>
> I don't know if it had anything to do with Rev Online
> but that is the sequence of events and the problem
> with quitting I had.  I also use GXL2 script editor and
> every time I tried to quit it would save the settings so
> it did go though a small process of quitting.
>

I have sometimes had a problem with GLX2 not allowing me to quit after
I had been editing the script of an object and then deleted that
object. If it still had a tab open for the non-existent object, then
quitting will not work. Usually GLX2 closes such tabs when the object
is deleted, but not always.

Sarah
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
JB
Reply | Threaded
Open this post in threaded view
|

Re: Rev Online - Quit

JB
Thanks Sarah,  maybe that was the problem.

-=>JB<=-



On May 28, 2008, at 3:10 PM, Sarah Reichelt wrote:

> On Thu, May 29, 2008 at 4:41 AM, -= JB =- <[hidden email]>  
> wrote:
>> I just went to Rev Online and see they have it back up
>> and working.
>>
>> After quitting Rev Online I decided to quit Rev and it
>> would not quit.  I then used quit from the Rev menu &
>> it would not quit so I used Force Quit.  I am on a Mac.
>>
>> I started Rev up again and then it Quit properly.
>>
>> I don't know if it had anything to do with Rev Online
>> but that is the sequence of events and the problem
>> with quitting I had.  I also use GXL2 script editor and
>> every time I tried to quit it would save the settings so
>> it did go though a small process of quitting.
>>
>
> I have sometimes had a problem with GLX2 not allowing me to quit after
> I had been editing the script of an object and then deleted that
> object. If it still had a tab open for the non-existent object, then
> quitting will not work. Usually GLX2 closes such tabs when the object
> is deleted, but not always.
>
> Sarah
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Rev Online - Quit

Jerry Daniels
In reply to this post by Sarah Reichelt-2
Sarah,

That orphaned tab (to a deleted object) needs fixing. Thanks for the  
reminder.

Best,

Jerry Daniels

Daniels & Mara, Inc.
Makers of GLX2
http://www.glx2.com




On May 28, 2008, at 5:10 PM, Sarah Reichelt wrote:

> On Thu, May 29, 2008 at 4:41 AM, -= JB =- <[hidden email]>  
> wrote:
>> I just went to Rev Online and see they have it back up
>> and working.
>>
>> After quitting Rev Online I decided to quit Rev and it
>> would not quit.  I then used quit from the Rev menu &
>> it would not quit so I used Force Quit.  I am on a Mac.
>>
>> I started Rev up again and then it Quit properly.
>>
>> I don't know if it had anything to do with Rev Online
>> but that is the sequence of events and the problem
>> with quitting I had.  I also use GXL2 script editor and
>> every time I tried to quit it would save the settings so
>> it did go though a small process of quitting.
>>
>
> I have sometimes had a problem with GLX2 not allowing me to quit after
> I had been editing the script of an object and then deleted that
> object. If it still had a tab open for the non-existent object, then
> quitting will not work. Usually GLX2 closes such tabs when the object
> is deleted, but not always.
>
> Sarah
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Rev Online - Quit

Sarah Reichelt-2
On Fri, May 30, 2008 at 3:03 AM, Jerry Daniels <[hidden email]> wrote:
> Sarah,
>
> That orphaned tab (to a deleted object) needs fixing. Thanks for the
> reminder.
>

Unfortunately it is an intermittent bug and I have never managed to
work out what makes it happen.

Sarah
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution