amp Posted May 18, 2019 Share Posted May 18, 2019 I have a variable that is a 32 bits integer. I want to convert it to a 32 bits binary value and displayed on screen using To.Bit() expression on a variable display component. But it returns only showing maximum 20 bits like {(0,0,1,0........}} . I also tried using From.Bit(B00,B01,B02, ........, B31), it failed. I can only use From.Bit(B01,B02,B03, ......B19) to convert maximum 20 bits only. I read the manual section 4.12.10 on page 74-76 regarding the Bit() conversion expressions. It mentioned to convert 32 bits variable. So why my expression can only convert for 20 bits value? How to convert to or from 32 bits variable? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted May 20, 2019 Share Posted May 20, 2019 To avoid bogging down your system by accidentally specifying a big array, DAQFactory will only display the first 20 values in any array. So if you do: myChannel instead of myChannel[0] you'll only get the first 20 values of myChannel, not the entire history, which would chew up a lot of CPU time to display, over and over again. So, you are running up against this. What you'll have to do is display two sets of 16: (To.Bit(x))[0][0,15] and (To.Bit(x))[0][16,31] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.