LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean logic : Enabling & Disabling Bit

Solved!
Go to solution

Hi dangeross,

 


@dangeross wrote:

 I naturally think of AND, OR, etc as single bit operations so I don't immediately think of the Polymorphic nature of LabVIEWs logic functions.


In all Assembler variants that I used so far those boolean operations work on "arrays of bits" aka integer values (byte, word, long)...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 41 of 48
(365 Views)

I am thinking this is a good compromise for getting 32 bits and not having to many terminals. I am not sure if it is still malleable. I can't really picture the the array of indices.

Download All
0 Kudos
Message 42 of 48
(358 Views)

Hello GerdW,

   It could also be my time programming PLCs with Ladder Logic or the dark past designing logic circuits using the old 74xx series chips. I have also had instances where the system would evaluate zero as false and any non zero as true. Also worked with a system a couple of years ago where you could almost use True/False or On/Off interchangeably with False & Off being zero but one of them had one as True and the other had non-zero as True.

 

Regards,

    Dangeross

 

0 Kudos
Message 43 of 48
(354 Views)

@dangeross wrote:

I have also had instances where the system would evaluate zero as false and any non zero as true.


That is the IEEE definition. You can actually easily prove that LV uses that logic by just converting a U8 to a boolean via a Type cast, anything except 0 is True.

Yamaeda_0-1718810081042.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 44 of 48
(330 Views)

@dangeross wrote:

I am thinking this is a good compromise for getting 32 bits and not having to many terminals. I am not sure if it is still malleable. I can't really picture the the array of indices.


You failed to "save for previous".

0 Kudos
Message 45 of 48
(328 Views)

Saved back to V18 which is the earliest that didn't give errors when saving.

Download All
0 Kudos
Message 46 of 48
(300 Views)

@dangeross wrote:

Saved back to V18 which is the earliest that didn't give errors when saving.


You can't be serious! You are still herding CATS boolean while all you need is a cluster! 32x less code!!!!

Your connector pane of your subVI is still a total mess. You want inputs on the left and outputs on the right, not all over the place!

... and please don't give a vim and a vi the same name!

 

altenbach_0-1719418168455.png

 

 

0 Kudos
Message 47 of 48
(290 Views)

   The purpose of this is to create a SubVI or VIM that will allow the easy modification of bits in a number. There is a lot of equipment that uses U16s to control the function of the machine through various bits. There is usually a program that reads or writes to the U16 to control the device but there are occasions where the ability to set or clear a bit downstream of the program that is controlling the device is needed. I don't envision there being a case where the boolean switches would all be neatly arranged in a cluster but rather spread out across the panel and even some of the booleans coming from other sources in the VI that are not switches and even perhaps coming from a Local/Global/Shared variable. If I was making an Altair 8800 simulator then I would definitely using clusters of booleans. But what I need is not a Clouder but a way to track Tigers across a larger range. As for the same names for the VIM and VI the VI only serves as a place to test the VIM and will never see life outside of that function. If there is a style guide for LabVIEW that you can point me to that would be appreciated.

0 Kudos
Message 48 of 48
(272 Views)