LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Analog 14V signal to a boolean

Hi all, 

 

I'm trying to use a proximity sensor (Panasonic GX-F/H) which switches between 0 and 14V to stop a linear motor. What is the proper way to convert the analog input singal from the sensor into a boolean? 

My attempt was to connect the sensor to the analog input of my DAQ 6008 and use a comparator (signal < 10V) --> see attachement. This actually worked but it sometimes had a delay of more than 1s, what makes it impossible to position the motor accurately. Any ideas to solve this problem? Thanks in advance!!Smiley Happy

 

Regards

JW

0 Kudos
Message 1 of 3
(2,688 Views)

Hi Bigles,

 

you don't have an "analog signal" - you have a DDT wire…

 

Either convert the DDT signal to a DBL wire (ExpressVI functions palette: "FromDDT"…) to compare the DBL with your limit OR convert the result of the comparison from DDT to boolean value (ExpressVI function palette: "FromDDT")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,672 Views)

Hi Gerd! 

 

Thanks a lot for the help. I really appreciate!

 

I changed the DDT-signal with the "FromDDT"-converter. This works and finally i got a boolean signal. However, I did not help with the delay that sometimes occured. But I just figured out that the issue was due to a too high "number of samples" which I defined. Now everything works. 

 

Thanks a lot and have a nice week

Best regards 

JW

0 Kudos
Message 3 of 3
(2,662 Views)