07-09-2011 02:26 AM
how i can convert data (011010101) from parallel to serial?
07-09-2011 03:11 AM
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?
07-09-2011 04:06 AM - edited 07-09-2011 04:08 AM
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
07-09-2011 10:29 AM
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".
07-09-2011 11:15 AM
@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
07-09-2011 11:15 AM - edited 07-09-2011 11:19 AM
07-09-2011 12:18 PM - edited 07-09-2011 12:28 PM
@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.
07-09-2011 01:40 PM - edited 07-09-2011 01:42 PM
@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 arrayI 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
07-09-2011 02:53 PM
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.