Page 1 of 1

Log Bit Status

Posted: Mon May 06, 2024 4:50 pm
by kizilkaya
Hello Dear TOM

I added a checkbox in "ToolSetupTPPage". When it is active, I want to print the status of virtual bits between 1024-1120 to the "Z:\\OILOG.bin" file once a second as 96-bit data, for example: If bits 1024, 1029,1120 are active, they are 96-bit. The data should output like out.txt:

So the first bit represents 1024, the 2nd bit represents 1025, the 3rd bit represents 1026.... 96 bits represent 1024.


Note : I could not edit the data from the GetVirtualBits command so that the first bit represents 1024 and the last bit represents 1120.

Can you help me with the code, good work.

Re: Log Bit Status

Posted: Mon May 06, 2024 5:18 pm
by TomKerekes
Hi kilzilkaya,

It would be nice if you explained what you are trying to accomplish. If you need these bits in another Windows App it would be better to have the app read them directly.

You might look at or use the function:

Code: Select all

bool CScreen::ReadBitCached(int bit)
You can get the Virtual bits individually by calling the function with bit from 0 - 95

Re: Log Bit Status

Posted: Wed Jul 03, 2024 11:41 am
by kizilkaya
Dear Tom

Is it possible to write two examples?

Example 1) Reading 1024 bit status?
Example 2)1025 setbit ?

Thank you for your attention.

Re: Log Bit Status

Posted: Wed Jul 03, 2024 8:57 pm
by TomKerekes

Code: Select all

bool bit = TheFrame->GCodeDlg.Screen.ReadBitCached(1024);

Code: Select all

TheFrame->KMotionDLL->WriteLine("SetBit1025");

Re: Log Bit Status

Posted: Thu Jul 04, 2024 1:15 am
by kizilkaya
Thank you very much TOM, you are best :)