09-30-2016 10:11 AM
Other notes:
You probably can probably ditch the 100 ms wait unless the instrument manual explicitly mentions a need to wait. Most instruments will be ready to accept another command immediately after writing the results to the output buffer.
Be neater with your block diagram. While this may seem nit-picky, consider the text language eqivalent: Random indents. Where the compiler doesn't care what the indents look like, I would look the other way while a fellow developer was strangling you because he couldn't read your code. 😉
09-30-2016 10:18 AM
Be neater with your block diagram. While this may seem nit-picky, consider the text language eqivalent: Random indents. Where the compiler doesn't care what the indents look like, I would look the other way while a fellow developer was strangling you because he couldn't read your code. 😉
Absolutely true 🙂
I think I am not perfectly clear with that termination character...
09-30-2016 10:22 AM
Personally I'm still suspicious about your claim that your device uses / as termination character. It's not impossible but definitely VERY unusual. And if the device really sends that as termination character back, it may also expect you to send it the same termination character at the end of the command that you write. Again it's not impossible that it doesn't want that or even throws its hands up in the air in despair if you do, but very unlikely not to do.
If the non-standard termination character you claim it uses is true, and your device doesn't cope well with terminating your command with the same termination character, it really looks like some plumber took on the task to develop this controller for your pump and by some magical mishap managed to get something working and put it in a product.
09-30-2016 10:24 AM
ICCR,
I agree with rolf that is a strange termination character. Can you provide us the model information for the instrument youre using? Is it custom or off the shelf? We may be able to look into the protocal for you.
09-30-2016 10:24 AM
ne way to tell - if you can upload the manual, then we can RTFM 😄 (Read The Fabulous Manual)
09-30-2016 10:27 AM - edited 09-30-2016 10:28 AM
@rolfk wrote:Personally I'm still suspicious about your claim that your device uses / as termination character. It's not impossible but definitely VERY unusual. And if the device really sends that as termination character back, it may also expect you to send it the same termination character at the end of the command that you write. Again it's not impossible that it doesn't want that or even throws its hands up in the air in despair if you do, but very unlikely not to do.
If the non-standard termination character you claim it uses is true, and your device doesn't cope well with terminating your command with the same termination character, it really looks like some plumber took on the task to develop this controller for your pump and by some magical mishap managed to get something working and put it in a product.
Quoted from the manual:
"Each command is characterized by a unique two-letter command code. Response strings sent by the pump are terminated by the "/" character"
Edit: manual: http://ssihplc.com/downloads/manuals/903042.pdf
from P27
sooo...
09-30-2016 10:30 AM
Please, please, please, do not send pictures (.png) files of your VIs (.vi) -- attach the actual VI. This allows us to "see everything", and even to execute your code and see what is going on.
You might have noticed that responders to your post seem to have violated the "no pictures", as they've attached PNGs. Do you see the little LabVIEW symbols at the top of the picture? This identifies them as LabVIEW "Snippets", code that has been packaged with a "Picture Front End" -- if you drag such a "picture" into an empty LabVIEW Block Diagram, it will become the VI through a bit of NI-Magic.
You can create your own Snippet by selecting all of your code (Ctrl-A), clicking the Edit Menu item, and choosing the Create Snippet From Selection option. Now you'll have a .png that we would welcome ...
Bob Schor
P.S. -- I didn't look carefully at your picture, but I wonder if you are handling the termination characters correctly. I saw a "/" character somewhere that I didn't understand -- did you mean to use "\" instead?
09-30-2016 10:34 AM
@Bob_Schor wrote:Please, please, please, do not send pictures (.png) files of your VIs (.vi) -- attach the actual VI. This allows us to "see everything", and even to execute your code and see what is going on.
You might have noticed that responders to your post seem to have violated the "no pictures", as they've attached PNGs. Do you see the little LabVIEW symbols at the top of the picture? This identifies them as LabVIEW "Snippets", code that has been packaged with a "Picture Front End" -- if you drag such a "picture" into an empty LabVIEW Block Diagram, it will become the VI through a bit of NI-Magic.
You can create your own Snippet by selecting all of your code (Ctrl-A), clicking the Edit Menu item, and choosing the Create Snippet From Selection option. Now you'll have a .png that we would welcome ...
Bob Schor
P.S. -- I didn't look carefully at your picture, but I wonder if you are handling the termination characters correctly. I saw a "/" character somewhere that I didn't understand -- did you mean to use "\" instead?
sorry !! and thank you for explaning me on how to behave on this forum, again I am new to Labview and I much appreciate to be taugh those kind of very useful advice!
here is my VI:
And I meant to use a "/" as it's recommended in the manual 🙂
Flo
09-30-2016 10:36 AM - edited 09-30-2016 10:37 AM
It's definitely a forward slash. And I second that upload real code thing. We can't tell, for instance, if the integer you are using for the typecast is u8.
I'm late to the party. 😉
09-30-2016 10:37 AM
If i read the manual correctly it looks like he should be transmitting commands with a CR and receiving commands with a /