From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

device works using max but not with VI

Hi All..

I am able to control a kepco power supply with comminicating by MAX. But with VI (7.0) that has the same command structure it s not possible..Moreover, i dont get any error message either. Could you have a look the VI attached and make ur comments.
thanks
0 Kudos
Message 1 of 13
(2,826 Views)

May you come up with more description of what H/W re U using exactly ?

That way it ll be easy to suggest a solution... Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 2 of 13
(2,806 Views)
You've also got the error out indicator way off screen. Move it over and make sure there are no errors shown there.
0 Kudos
Message 3 of 13
(2,800 Views)
OK, you asked for comments...Smiley Wink
  • I would suggest running the VI in single-step and highlight mode to determine if this is a timing issue. Also, it will aid in determining which command is failing.
  • Is the VISA resource name properly set? I know it seems like a dumb question, but this happens more often than people care to admit. Heck, I've done it myself.
  • You don't actually need to wire the "error in/error out" for the "Format Into String" function. Those are used if the format string is a control, and thus the format string isn't initially known. When you hard-code the format string the function checks the inputs automatically.
  • Your code is a wiring mess, and I couldn't follow what you're doing inside the loop. I suspect that you can accomplish what you're doing in the loop by either using a ramp function to generate your ramp followed by a for-loop, or a timed loop.
0 Kudos
Message 4 of 13
(2,793 Views)
I have localized where there are something strange happening.
I attach 2 VIs one of which works but not other one. The only difference is that  the working one writes data to Writing VI via buffer. When I change buffer to string it doesnt? It doesnt any make any sense to me.. What is wrong?
0 Kudos
Message 5 of 13
(2,780 Views)
I have localized where there are something strange happening.
I attach 2 VIs one of which works but not other one. The only difference is that  the working one writes data to Writing VI via buffer. When I change buffer to string it doesnt? It doesnt any make any sense to me.. What is wrong?
Download All
0 Kudos
Message 6 of 13
(2,780 Views)
Thanks for comments.. And i have some questions regarding your comments. Firstly, If i didnt wire error clusters to ""format to string""function, would I not have problem with order?( since i ll wire error directly to write function, vi would not skip the ""format into strin function"" causing absence of string to write?
In the loop , im ramping the current from 0 to A ,from A to -A and, stooping ramping when it reaches 0 with equal increments.. Is any VI exist to do so?
Lastly, as I attached to my last mesage, writing data is possible by using buffer data type..But when I insert a ""format to string ""function and trying to write by using string it device doesnt obey the command.. What could be that reason?
thanks

0 Kudos
Message 7 of 13
(2,777 Views)
Could you enter data into each of the front panel controls and then go to Operate>Make Current Values default. Do this with each one, save the VIs, and repost. It would help to see what the difference is between the generated string and what you are entering in on the front panel.
 
Also, you cannot 'skip' the Format to String or affect the order because the VISA Write requires the output of Format to String. That is the meaining of dataflow.

Message Edited by Dennis Knutson on 03-15-2007 10:39 AM

0 Kudos
Message 8 of 13
(2,776 Views)
I attach the VIs as u asked... I hope it helps..
Download All
0 Kudos
Message 9 of 13
(2,758 Views)
The only difference between the two strings to the VISA Write is that you have 4 decimal places in the one that doesn't work. It's possible that the instrument is rejecting the command because of that. Try changing the format string and if the instrument has an error query, run that and see what the instrument says. You can debug all of this in MAX by first sending CURR 2, then CURR 2.0, etc.
Message 10 of 13
(2,746 Views)