11-02-2011 01:28 AM
Hello all,
Help needed to solve the issue. Here i attached a vi for your reference.
Solved! Go to Solution.
11-02-2011 01:35 AM - edited 11-02-2011 01:37 AM
Yes, number to hexadecimal string
11-02-2011 01:45 AM
@Even Deejay wrote:
Yes, number to hexadecimal string
No, that will not work:
11-02-2011 01:48 AM - edited 11-02-2011 01:49 AM
Dear Even. The actual problem with me right now is u can see from the image,
11-02-2011 02:13 AM - edited 11-02-2011 02:16 AM
Here is equivalent code that does not use any case structures. I am not sure if it is any simpler. (LabVIEW 8.6)
For a better solution, we need to know what the range of possible input values is, because all you get out is a single useful byte (first byte is always zero). Most likely the code could be further simplified once we have more details on the problem. My currently attached solution gives identical output as your code for all possible I32 inputs (not fully tested).
11-02-2011 03:39 AM - edited 11-02-2011 03:41 AM
Dear altenbach,
Thanks for u r reply. the range of input is between 0 - 29 only. The output is communicated with PLC using RS-232 C. the problem which have right now is, if sent the actual input its get changed as ASCII while communicating. I dont have a right person to convert the ascii into required value on the PLC hand.
11-02-2011 04:05 AM
Hello ,
I am posting the equivalent diagram.
Regards,
Bijay
11-02-2011 11:26 AM
@Stephen.J wrote:
the problem which have right now is, if sent the actual input its get changed as ASCII while communicating. I dont have a right person to convert the ascii into required value on the PLC hand.
That makes little sense: Who changes what into what? Can you elaborate? Usually conversions are done by a computer, not by a person.
11-02-2011 12:36 PM
Try this:
11-02-2011 01:30 PM - edited 11-02-2011 01:34 PM
@Stephen.J wrote:
Thanks for u r reply. the range of input is between 0 - 29 only.
I this case make sure the input is 16 bits. now the code is slightly simpler (you might need to ensure that the input is not out of range)