05-17-2012 01:13 AM
Iam doing VISA serial reading and writing.In the attached VI reading happens only bit by bit.But I need the output as "9A42" itself as shown in the example.Please suggest a way to read entire bytes properly.
05-17-2012 01:37 AM
Hi!
It's not clear to me what you want to do with your vi.
Anyhow:
the string array control is out of the while loop, so its value is read only once, so basically the case structure will always execute the "false" case.
A couple of questions:
Do you need to use two different serial ports, as in your code?
Shouldn't you read *after* the writing? (in your code the two actions are executed in parallel)
Note that VISA Reading read entire bytes and not bits.
Regards,
Marco
05-17-2012 01:40 AM
Can we convert a "string to string array"??
05-17-2012 01:46 AM
"Note that VISA Reading read entire bytes and not bits."
But while running this VI we can see the output as:9 then after sometime 'A' then '4'......Iam trying to view the output as '9A42' itself.
05-17-2012 02:00 AM
In your vi you are reading 1 byte: you should change the constat your wired to the needed value (4?) and, as I said earlier, your should read *after* you wrote.
Regards,
Marco
05-17-2012 02:40 AM
Hi Marco,
By changing it to 4 we can read 9A42 but on the next iteartion 2976 is coming togather.I just need to read the data as per the index of the array is increasing.