05-05-2011 06:19 AM
05-05-2011 06:21 AM
thanks for ur reply.
i learned about the VISA serial, but i am only facing 1 problem.
I WANT TO SEND 2 BYTES ( each byte of 8 bits) to the pic , one byte to drive 1 servo motor, and the other to drive the second.
HOW CAN I SEND 2 BYTES to the input of the visa write knowing that those bytes i have them ready as U8 ????
do i have to convert them to strings? and how can i let them both be input to the VISA WRITE
05-05-2011 06:24 AM
Dear Ray, thanks for ur reply.
i learned about the VISA serial, but i am only facing 1 problem.
I WANT TO SEND 2 BYTES ( each byte of 8 bits) to the pic , one byte to drive 1 servo motor, and the other to drive the second.
HOW CAN I SEND 2 BYTES to the input of the visa write knowing that those bytes i have them ready as U8 ????
do i have to convert them to strings? and how can i let them both be input to the VISA WRITE???
There is a tool named ' format into string;' i think it can help me , but this will divide me the BYTE that i have into 3 characters .. and i dont want this, i want to send each byte as one character.. please help me if u can .thxx
05-05-2011 09:57 AM - edited 05-05-2011 09:59 AM
Have a little patience. No need to ask the same thing 4 times.
Here's a simple way with the Byte Array to String function. Having two separate VISA Writes would also work. Did you try anything at all? Format into string is not at all correct.
05-05-2011 11:19 AM
can u explain me wut are u doing here please ?
i did something different .
i took the 8 bits , enter it to ' build array' and then BYTE ARRAY TO STRING . In this way i can transform the 8 bits to string right?
and then i used' CONCATENATE STRINGS' in order to send 2 STRINGS to the visa WRITE
CAN I DO THIS ???
05-05-2011 11:42 AM - edited 05-05-2011 11:44 AM
Yes, you can do that but why? Simpler to have an array with both bytes in it to start with like my example.
You can also have a single string constant. Right click on it and select 'Hex Display'. Type in as many bytes as you want and wire it directly to the input of the VISA Write.
p.s. And stop shouting! No need for the all caps.
05-05-2011 01:54 PM
heheh .. i am not shouting i just write this way sorry lol.
The 2 bytes that i have are not constant, i have them as output after a signal processing algorithm.
those bytes should be converted to 2 strings before they are sent right?
i did not understand why are u multiplying the Bytes by 55 and AA ?? and another thing, i have 2 Bytes so isnt the Concatenate Stings necessary? since i have to send them both ?
05-05-2011 02:00 PM
There is absolutely no multiplication being performed. I simply have an array constant with byte values of 55 and AA. You can simply take your separate bytes, wire them to a single build array function and wire that to a single Byte Array to String. No, the concantanate string function is not necessary.
If you really think there was multiplication being done and don't recognize an array constant, you should stop everything and take some of the LabVIEW tutorials.
05-05-2011 07:52 PM
okay, i think i got the idea , just one more question please. Did u say that i should wire each Byte to a build array? or i should wire both bytes to 1 Build array ( of 2 inputs) and then the output will be connected to the VISA WRITE? i will attach a part of my project to check it please. Thanks again for ur help , and u are right am not an expert in labview. i just have a limited time to finish this project and i really appreciate your help
05-05-2011 07:54 PM
thx again