LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how i can convert my data from parallel to serial?

how i can convert data (011010101) from parallel to serial?

0 Kudos
Message 1 of 9
(3,888 Views)

Your question does not make a lot of sense. Can you explan in a few more sentences what you have in mind, maybe give an example?

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

Take a look at  the attached VI and see if it is what you looking for. It can convert any 9bit binary number from parallel to serial

0 Kudos
Message 3 of 9
(3,882 Views)

That doesn't help explain anything.  All you are doing is taking an array of booleans and indexing through it.  It really has nothing to do with "parallel vs. serial".

0 Kudos
Message 4 of 9
(3,872 Views)

@Ravens Fan wrote:

That doesn't help explain anything.  All you are doing is taking an array of booleans and indexing through it.  It really has nothing to do with "parallel vs. serial".


Indexing Boolean array is equivalent to conversion from parallel to serial, If you monitor the output of the index array VI you can  see the serial data representation the of the content of the input Boolean array

0 Kudos
Message 5 of 9
(3,866 Views)
 
0 Kudos
Message 6 of 9
(3,866 Views)

@kamdy wrote:
Indexing Boolean array is equivalent to conversion from parallel to serial, If you monitor the output of the index array VI you can  see the serial data representation the of the content of the input Boolean array

I aree with Ravens, even though your interpretation could be something that the original poster had in mind. Typically, "serial vs parallel" are probably not the customary words for all this. It is also not a "conversion", just a different display in time-space. We really need to wait until the original poster answers my question in the first reply.

 

 

The original poster showed 011010101, which you interpreted as boolean array, while it could have been many other things (9 character string, 9 element numeric array, 9 significant bits of a numeric scalar, etc.).

 

The example program you have attached (top in image) is also overly complicated and lacks elegance. If you had ever heard of autoindexing, you probably would have done something else (bottom of image). The autoindexing code will automatically adjust to the actual size of the input array, while you need to edit the diagram whenever the input changes, and if the constant wired to N does not match, you either stop prematurely or output default data that did not exist in the original array. Both situations that are misleading and potentially dangerous.

 

 

 

 

Message 7 of 9
(3,851 Views)

@altenbach wrote:

@kamdy wrote:
Indexing Boolean array is equivalent to conversion from parallel to serial, If you monitor the output of the index array VI you can  see the serial data representation the of the content of the input Boolean array

I aree with Ravens, even though your interpretation could be something that the original poster had in mind. Typically, "serial vs parallel" are probably not the customary words for all this. It is also not a "conversion", just a different display in time-space. We really need to wait until the original poster answers my question in the first reply.

 

 

The original poster showed 011010101, which you interpreted as boolean array, while it could have been many other things (9 character string, 9 element numeric array, 9 significant bits of a numeric scalar, etc.).

 

The example program you have attached (top in image) is also overly complicated and lacks elegance. If you had ever heard of autoindexing, you probably would have done something else (bottom of image). The autoindexing code will automatically adjust to the actual size of the input array, while you need to edit the diagram whenever the input changes, and if the constant wired to N does not match, you either stop prematurely or output default data that did not exist in the original array. Both situations that are misleading and potentially dangerous.

 

 

My VI is not complicated I write it according to the requirement of the poster. If you notice the data send by the poster it's 9bit data so i made my VI according to that requirement. My VI is working OK and it is simple 

 


 

0 Kudos
Message 8 of 9
(3,842 Views)

It is sufficient to quote a small section from the previous post in cases where it is ambiguous what the answer refers to. There is no need to quote entire long posts.


@kamdy wrote:
If you notice the data send by the poster it's 9bit data so i made my VI according to that requirement.

Your VI example contains an empty array, not a boolean array with 9 element. The size of the array container has nothing to do with the actual array size.


@kamdy wrote:
My VI is not complicated I write it according to the requirement of the poster. 

There are no "requirements" posted, just a very short and very ambiguous question. The only specific item (011010101) is completely missing from your example. And, yes, your VI is more complicated that it should be, because it uses 3 times too many diagram elements than actually needed. For larger programs, such a difference could mean a diagram that nicely fits on the monitor and one that fills three screens and will take (3)² times longer to debug, troubleshoot, maintain, and upgrade.

Message 9 of 9
(3,829 Views)