Discussion:
Implement line decoder using equation how to?
(too old to reply)
ehsanelahimirza
2008-07-13 08:40:06 UTC
Permalink
hi all
 
i want to implement 4 to 16 line decoder and 8 to 256 line decoder in LV8.5
using boolean palletes is a very time taking process.
 
so i want it to implement using some equations but i dont know how to implement some equation in labview.
i will have 8 inputs and 256 outputs.
 
plz tel me how to implement this kind of equation?
 
thanks in advance


decoder.JPG:
Loading Image...
Dennis Knutson
2008-07-13 15:40:05 UTC
Permalink
Can you explain what these 256 outputs are supposed to be? Since you posted to the digital I/O board, I would assume that you are trying to drive some sort of DAQ device. It that's true, you certainly don't need 256 individual outputs.
Here's how you can convert 8 inputs to a number between 0 and 255. Even if you needed 256 individual indicators, they way you are doing it is unnecessarily complex.
<img src="Loading Image..."> Message Edited by Dennis Knutson on 07-13-2008 09:21 AM


Boolean Array to Number.PNG:
http://forums.ni.com/attachments/ni/70/9164/1/Boolean Array to Number.PNG
ehsanelahimirza
2008-07-13 16:40:06 UTC
Permalink
actually i am driving some devices using serial communication.
&nbsp;
it was my final year project and i used 3 devices to drive using 3 to 8 line decoder and sending the code at output.
now i am thinking to extend it as i had offer from some company. i need to drive 8 devices. i have 8 digital signals in labview for each device to switch on or off. now the problem is how to send this digital data at output (conversion to a byte).
for reference i am attaching my old VI which i used to drive 3 devices. ( driving 8 devices by same coding needs a lot of work). so if you can plz guide me some other way i will be thankful.
&nbsp;
thanks again


UIAM GUI new test.vi:
http://forums.ni.com/attachments/ni/70/9165/1/UIAM GUI new test.vi
Dennis Knutson
2008-07-13 17:10:13 UTC
Permalink
You got an offer to write LabVIEW code?:smileysurprised:
Your VI makes little sense to me. You are reading from a single device and writing to a single device. And, your boolean logic is way too convoluted. I'm trying to understand what this is supposed to do but I think you need to do what I suggested. You can wire the numeric output to a single case structure and have different cases for individual or a range of values.
Your VI is also set to run only once. You need a while loop. DO NOT use run continuous mode. Before you do much more LabVIEW programming, you should take some of the <a href="http://www.ni.com/academic/lv_training/how_learn_lv.htm" target="_blank">LabVIEW tutorials</a>.
ehsanelahimirza
2008-07-13 17:40:06 UTC
Permalink
it was some offer for implementing my project which has a lot of hardware and modules, it consisted some sensors and it has almost any kind of driving capability
conveyor belt, stepper motor, servo motors, AC, DC motors and fan heater AC, a lot of things.
&nbsp;
but the problem is how i can send this data to a microcontroller for switching on/off and speed control of each device.
&nbsp;
ur given example is a good, i am working on it. if you have some more better idea plz tell me.
&nbsp;
working of my project (in very very simple words)
at temperature 20c conveyor start
at 30c AC water pump start
at 40c stepper motor clockwise start
at 45c stepper motor fast
at 50c DC motor start
at 60c Fan starts
at 70c heater off
&nbsp;
thanks
&nbsp;
&nbsp;Message Edited by ehsanelahimirza on 07-13-2008 12:39 PM
Dennis Knutson
2008-07-14 13:40:09 UTC
Permalink
You could eliminate all of the comparisons and multiple case statements as I said. Here's an example. However, what you don't have in your old program and would need, is something to handle the situation when the termperature is ramping down.


Case With Ranges.vi:
http://forums.ni.com/attachments/ni/70/9171/1/Case With Ranges.vi
Continue reading on narkive:
Search results for 'Implement line decoder using equation how to?' (Questions and Answers)
3
replies
hey guys!! i really need ur help with dis essay-Computer And Its Advantatges?
started 2006-08-19 23:47:00 UTC
homework help
Loading...