04-13-2009 03:41 PM - edited 04-13-2009 03:44 PM
Dear All,
I'm busy with making a control/read out program for ISCO pumps.
At this moment I'm having troubles with sending the commands to the PUMPS in HEX. When I use a STRING CONTROL in HEX display everything works fine (when I manually write down the command in the string control).
The command exist of a couple of parts: Destination/string length/command/Checksum. I'm trying to make an sub-vis which automatically calculates the checksum (modulo 256) and adds it to the string. Everything is going well: First I split the ascii command to bytes and I calculate the checksum and add the HEX value as an ASCII to the command string. Also a CR (=0D) is added. Now the whole string should be converted to hex. The string contains the right HEX nummers but they are in ASCII format. Here's were I experience the trouble, I'm not sure how to do it!
So to summarize:
I have a ascii string containg the HEX values (for instance 315230303652454D4F544531420D) and it should be converted to a HEX string (For instance 3152 3030 3652 454D 4F54 4531 420D) so the ISCO pump will understand the command.
The VI is attached.
Thank you in advance,
Bio
Solved! Go to Solution.
04-14-2009 08:36 AM - edited 04-14-2009 08:37 AM
Hi,
I only have Labview 8.5, but I think I understood your problem :
this is a begining of the solution (each block of 4 numbers is considered as the number to be converted as hexadecimal, and if you want to convert a block of 2 digits, the result will not be the same !)
Let me know if it helps you !
Best regards,
Vincent
04-14-2009 09:46 AM
Bio,
This should do what you want.
04-15-2009 03:02 PM
Thank you guys! Wayne, yours is working really well! Ramses, I couldn't get your VI working, but thanks for the effort!
Solved!
04-16-2009 03:07 AM
Solved!
Please mark which post you think is the best solution to your problem so that it will help others who are facing same problem and looking for a solution. I hope you know that you can mark a solution by clicking on "Options" located at the top right corner of the post (which you think is the best answer that solved your problem) and select "Mark as solution".
Thanks for your understanding,
Mathan
10-15-2009 07:51 PM
I'm having the same problem using LabView 7.1 for the solution can I get picture of that solution
thanks
10-16-2009 07:42 AM - edited 10-16-2009 07:43 AM
ullo,
Here is image.
10-27-2009 06:34 AM
Hello everybody,
I have quite the same problem, I have a string of Hex I would like to transform into a hex string.. I would like to understand the VI of Ramses because It seems a little bit difficult. My initial string BF61E687 must become the hex string BF61 E687 that I transform into SGL to have -0,882424.. Someone can help me?
Thanks you very much
Kastillio
10-27-2009 07:20 AM
10-27-2009 10:05 AM