Log Bit Status

Moderators: TomKerekes, dynomotion

Post Reply
kizilkaya
Posts: 7
Joined: Mon Sep 25, 2023 6:01 pm
Location: TURKIYE

Log Bit Status

Post by kizilkaya » Mon May 06, 2024 4:50 pm

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.
Attachments
btn.txt
(50 Bytes) Downloaded 235 times
out.txt
(142 Bytes) Downloaded 233 times

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Log Bit Status

Post by TomKerekes » Mon May 06, 2024 5:18 pm

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
Regards,

Tom Kerekes
Dynomotion, Inc.

kizilkaya
Posts: 7
Joined: Mon Sep 25, 2023 6:01 pm
Location: TURKIYE

Re: Log Bit Status

Post by kizilkaya » Wed Jul 03, 2024 11:41 am

Dear Tom

Is it possible to write two examples?

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

Thank you for your attention.

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Log Bit Status

Post by TomKerekes » Wed Jul 03, 2024 8:57 pm

Code: Select all

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

Code: Select all

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

Tom Kerekes
Dynomotion, Inc.

kizilkaya
Posts: 7
Joined: Mon Sep 25, 2023 6:01 pm
Location: TURKIYE

Re: Log Bit Status

Post by kizilkaya » Thu Jul 04, 2024 1:15 am

Thank you very much TOM, you are best :)

Post Reply