LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to divert data to different branches - like a demultiplexer

I am using Labview 7.1.
I have developed a program which will receive packets of size 4KB through UDP, write it to a file, then seperates out 32 channels from the pkt , do some processing and displays. display includes some waterfall plotting also (which uses intensity graph and shiftregisters).
now i want to modify this program to receive another pkt also in between the 4k pkts whose size  is 2 bytes. i will check the pkt size and differentiate these two.now if it is 2 byte pkt it should display the values in an indicator. this i have done using a case structure. if it is 4k pkt  it should do all the activities i have mentioned in the beginning. since this part contains lot of block diagram code i can not put it into a case altogether- it uses shifft reg of while loop, file write which runs in while loop etc. i have put only the graphs in a case structure. ordinary graphs works well. it updates only when the correct pkt is received. but the water fall misbehaves when changing pkts. when the 2 byte pkt is received it stops.but when the 4k pkt comes again and it updates the values was already changed , i think because when 2 byte pkt was received , even though the displays were not updated, the shift registers were updated since they are outside the case.file writing also should occur only when the 4k pkt is received. i am using the (open file-write file-close file) combination.
 
my plan is like this :  
 
I want to control data to two different branches. . if the pkt is 2byte pkt, the  data should go to ,say ,process 1. now data should not go to process 2 or update any function there. if the pkt is  4kB byte pkt, the  data should go to ,say ,process 2. now data should not go to process 1. but i am not fining any function labview to divert data to two branches like this.
 this should work  like a demultiplexer.when we wire two wires  through 2 cases of a case structure and selects one at the output of the case, it is like a multiplexer. here the opposite action is required .
 
can any one help me to do this ?
0 Kudos
Message 1 of 2
(2,551 Views)
You should be able to do this with shift registers and case structures. Have both the 2-byte indicator and the graph connected to separate shift registers. In the 2-byte case pass the graph shift register through unmodified. In the graph case pass the scalar shift register through unmodified.

If you can post a simplified version of your program which shows the problem without requiring an external device to send data, someone will probably be able to help.

Lynn
0 Kudos
Message 2 of 2
(2,541 Views)