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: 

Error 1: Input parametes invalid

Hi, I'm trying to combine two separate Vi's into one front panel but when I do this the program gives an error 1, "Input parameters invalid" for the scan from string function. . The example VI's are taken from the DG645 example driver folder and are called "Send triggers in SS mode" and "Set Channel Delay". The two VIs work and did not give an error when ran on separate front panels but when I combine the codes onto one main VI the error occurs. What could be the problem here? I have attached my main Vi, too.

0 Kudos
Message 1 of 7
(2,487 Views)

Did you select the correct VISA resource for both?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 7
(2,483 Views)

Yes, they are both using the same Visa resource name

0 Kudos
Message 3 of 7
(2,481 Views)

I haven't looked at the two routines that you have combined into a single one, but I'm guessing the structure is something like this:

  • Initialize VISA Device.
  • Send VISA Command to do something.
  • When Button pushed, maybe do something else.
  • Exit.

You have all of the code except Initialize in a While loop, along with the Event Structure.  Remember how a While Loop works in LabVIEW (the Principle of Data Flow) -- you'll do the initial VISA Queries and initializations on the left side of the While, will wait until one button is pushed, will do everything in that Event's Case, then (unless you pushed Stop) will run the Loop again, sending VISA Queries and initializations, wait for another Button Push, etc.

 

What I think you want to do is more like this:

  • Initialize VISA (outside the While).
  • Initialize your Device (by sending VISA Commands and doing things, once).
  • In a While Loop,
    • Have a Button for each separate Action you want to do.
    • When the Button is pushed, do its Action.
    • When Stop is pushed, exit the While loop.

Bob Schor

0 Kudos
Message 4 of 7
(2,450 Views)

The example VI for the DG645 comes with an "initialize" subVI which initializes the visa outside the loop. Also, the buttons for each action are in the while loop so I believe already have what you suggested to do? I think there could be a timing problem which could be causing the error also, any ideas?

0 Kudos
Message 5 of 7
(2,442 Views)

Well, I don't have access to the DG645 Example Folder and its VIs, so I really can't comment on them as stand-alone applications.

 

Almost every example I've seen (and programmed) that used an Event Structure had the Event as the only structure in a While Loop.  You are putting it as a component of the Loop, which appears to me to be wrong.  Without seeing "what works", and understanding how you might adapt it to fix "what doesn't work", I have no other ideas.

 

Bob Schor

0 Kudos
Message 6 of 7
(2,435 Views)

Thank you for your help, I will try and see how I can change the program to only have the event as the only structure in the while loop and not a component of the loop.

0 Kudos
Message 7 of 7
(2,432 Views)