LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register

Solved!
Go to solution

dear all,

 

block diagram.png

 

front panel.png 

 

this is my block diagram and front panel looks like.the data I received is from UV spectrophotometer using RS232.FYI,there is no error with this design.readings from the spectrophotometer can be read by LabVIEW.the problem now is that spectrophotometer reading read only one reading at one time.here is the working principle of spectrophotometer.note that im using spectrophotometer to measure the absorbance of chemical solution.

 

spectrophotometer.png

 

as u move push the sample rack to position 1 - 4,the data will be displayed on labview.the sample solution for 1 - 4 is different.so, i would like to display all the data at one time for comparison. such as display it on graph chart and the data will be saved on excel.since im still new with labview, i have no idea how am i suppose to do.

 

or maybe u have any idea or suggestion?

 

as in attachment,i also tried shift register but the result will display the same value on all the indicators.how should i do to read the data and display it one by one.which mean at position 1,after the result displayed we stop the process then move to position 2 and display the data.and it continue until position 4.at the end we display all the data in one graph or chart.

 

your help is greatly appreciated

0 Kudos
Message 1 of 9
(2,739 Views)

Hello friend,

                         The problem in serial communication in labview is when you meantion the number of byte to read from serial port. that number will be updated after completion of data and updates only ones.

 

So as you wrote

 i would like to display all the data at one time for comparison

 

but you will read data serially. then how you can display all the result parallely. May be after 4th iteration you can show the data.

 

so after completion of communication use 3 shift register to hold the previous iterations data.

 

Let me know if you need any further help 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 9
(2,724 Views)

dear sir,

 

thank you for the reply.but can u please give me an example because i totally stuck with this problem.i dont know what else to do.

 

i look forward for your help

 

thank you

 

 

0 Kudos
Message 3 of 9
(2,714 Views)

Run the attached VI. Let me know if you need any help. This VI will show how to retain previous values.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 9
(2,709 Views)

You could use multiple shift registers, one for each value, or you could use a single array.

 

The array can be displayed in a graph (change the display style to suit your taste).  Other display options can be used as well.  Here is a quick example (random number generator used for data).

 

 

 

 

0 Kudos
Message 5 of 9
(2,686 Views)

Here is what I would do, assuming that the sensors are read out strictly in sequence.

 

 

Download All
0 Kudos
Message 6 of 9
(2,677 Views)

thank you all for the help.but still i have a problem.the instrument i use which is spectrophotometer is read data sequently.i have to move the push-pull rack sample manually to read next reading as u can see from the picture i've drawn.im so sorry to say this but still i cant figure out the solution.it seem like i have to stop one process then move the push-pull sample rack to other position then start the process and so on until 4 reading.im stuck!

0 Kudos
Message 7 of 9
(2,641 Views)
Solution
Accepted by topic author tk_ghani

If you have to use manual sample positioning you can take any of the solutions we provided and add the following.

 

Place the code we provided inside a sequence (flat or stacked) and add a frame before it.  In this new frame, add a while loop which has a button wired to the termination terminal.  Essentially, the code will sit and wait until you press the button to make the measurement. (You can add a small wait timer to reduce CPU usage, say 50 or 100 ms).  

 

 

Note that this is a very crude solution as the processing stays inside this loop until the button is pressed.  This prevents any other code from running.  Event structures are more robust.

 

 

If you want to automate this process, a motorized linear actuator would work nicely (although probably not worth it for 4 measurements).

0 Kudos
Message 8 of 9
(2,615 Views)

dear all,

 

thank you for your help and guidance.finally,problem solved!!!im so happy and once again,thank you very much!!

 

😃

0 Kudos
Message 9 of 9
(2,579 Views)