How to solve error using local variables?

I've created a sequence with a local variable.
But when I execute it, an error occurs since the first step (before the step where I manipulate the local variable).
The error code is something like:
Error in Evaluation. Syntax expression. Column [0-0]
It's interesting because it seems that once I've executed my sequence for the first time I can't create any other sequence where this error doesn't appear.

Pparo,
The problem does not occur under TS 1.0.3 on my system. However, I think we can get to the bottom of this.
When at a breakpoint in your sequence, if I type the expression "Locals.nls == 15-" in the TestStand watch window, I will get the message
Evaluation Failed: Syntax error in expression (Column 18-18)
I believe that this is the same type of error that you have encountered. Correct me if I am wrong.
The numbers after the word "Column" indicate where the error has occurred in the expression. In your case the error occurs at the beginning of an expression. The question still remains as to in which expression is error occurring.
Are you seeing this error reported in the watch window? If so, then you have typed the expression in the watch window.
If I copy the bad expression above into a the expression of a Statement step I get a run-time error of
An error occurred in the 'Statement' step of the 'MainSequence' sequence in 'Sequence File1'.
The post-expression for the step 'Statement' could not be evaluated.
Syntax error in expression.
Error Code: -17322
From what you report, the error appears to be located in your watch expression. When I executed your sequence with a breakpoint on the first step, I added the watch expression by selected the Context tab, expanding the Sequence Context tree view until I could see the nls variable, and then I dragged nls from the tree view to the watch window. This created the watch expression of Locals.nls. I also created the same watch expression by right clicking in the watch window, selecting Add Watch from the context menu, and selecting (or typing) Locals.nls. The expressions all evaluated to 24 without error.
This process has NOTHING to do with creating local variables. You asked if you are creating variables properly. There are only 2 ways to create variables in TestStand 1.0.3, neither of which you have described. The most common method is to select the Locals tab after opening your sequence (not during execution), right click in the right pane and add the variable of your choice. It seems like you did this correctly based on the sequence file you sent. The other method of creating variables is to do so programmatically. However, this is beyond the scope of this answer.
You ask a question about "the best way to create three constants in LabVIEW and pass them to a LabVIEW VI that is a step?" This implies to me that you want to create the strings within a VI called by one sequence step, and then use them in another VI called by a different sequence step. I would recommend taking a look at the example AccessingPropertiesAndVariables.seq that ships with TestStand. The first 3 VIs write values back to step properties, but could just as easily write them back to local variables. The 4th VI writes a file reference back to a TS local variable. The 5th and 6th step get the file reference from the TS local variable. You want to do something similar to the 4th and 5th VI, however, you want to send 3 strings to local TS variables, and then get them in the following VI. This will require using "TestStand - Set Property Value (String).vi" and "TestStand - Get Property Value (String).vi" which can be found in the TestStand function palette in LabVIEW. After reviewing this example you can then ask additional question. I recommend posting the question on a different thread since it is unrelated to your original question about the syntax error.

Similar Messages

  • How to use local variables to pass an image mask correctly

    I'm kind of new to labview but i'll try to explain the problem as best as i can: I'm trying to pass an image mask (basically an image) to the next iteration of a while loop using local variables. I think the image passes through the loop with the local variable but i can't read from it correctly for some reason. And I don't think the problem has to do with local variables because i've tried using shift registers and that didnt work either. I think the problem is that you need to do something to read the image correctly again, like using IMAQ copy or something (that didnt work tho), but i can't figure out what the problem is. Does anyone know what the problem is? I know this isnt a great explanation and if its too confusing i could send some snapshots of the program or something. Any help would be greatly appreciated though.
    Thanks,
    Will

    So i attached 2 snapshots of the program to give a better idea of the problem. The first snapshot shows an image getting written to the local variable SavedMask. The second snapshot, which is run on the next iteration of a while loop, shows the local variable SavedMask being read to other image operations. When i run the program, the SavedMask image is always displayed correctly on the front panel, but i can't read from it for whatever reason. I think the problem could be like you said, that im only passing an imaq reference, and i think theres a certain way to extract the image data. Do you know the correct way to extract the image data or how to pass the image data and not just a reference to the data.
    Attachments:
    first.jpg ‏81 KB
    second.jpg ‏68 KB

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • Possible to use local variables in Calculation Manager

    Hi,
    I'm using calculation manager in EPMA for the first time. Have not found any function for using "local variables", i.e. variables that can be used for fixing on the current members a user has selected in a form. Do someone know if it is possible to use that functionality in calculation manager? And in that case, how do I find it?
    Thanks!
    Regards
    Mats

    Hi,
    I guess you are referring to local variables in Essbase Administration Console. When you are in calculation manager (System View), you can go to Tools->Variables. There you can create variables at application, database (global) or business rule level (local variable). You can use these in Business rules by placing the name in curly bracket {...}.
    The usage of the variables in the forms is the same as before.
    If however, what you meant to say by local variables is substitution variables, yes you can use them in Calc manager the same way you use in calc script.
    Cheers,
    Alp

  • How to solve error -1450?

    I have been re-installed iTunes, and it keeps pop-up with the error -1450 ( cannot save music library ), and it reloads all the playlist each time I switch on the computer and open iTunes.
    I have been re-install iTunes after the error appear, and it seems although I have re-install iTunes, the problem doesn't solve and keeps repeat.
    For any kindness, please tell how I can fix this error, as I cannot find any articles on support page about this.
    Thanks

    Does anyone know how to solve error 1450 or even what
    caused it!? This problem is killing me.
    I found this by doing a search on Google for "Error 1450": http://support.microsoft.com/kb/236964/EN-US/

  • TS3694 How to solve error 3194 ?

    How to solve error 3194 in iTunes, when trying to upgrade iPod touch to ios 5 ? Thank you.

    The common errors and their resolution are contained here:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • How can I use local variable in LabVIEW-Action?

    Hi All!
    There is local variable (for example "MyVariable") in local scope of project. There is Action-step, created by LabVIEW. One of input terminals step is "Sequence Context".
    How can I access to MyVariable by Sequence Context? Unbundle? It does't work.
    Thank you.

    On the TestStand palette there is a VI called TestStand - Get Property Value.vi.  Use that.  Attached is an image showing how to use it.  The trick is making it produce the correct data type.  Do that by right clicking on the VI and selecting Select Type.  Then you can choose the type.  I think in LV 2010 and TS 2010 it is a polymorphic VI and you can just change it.  I wrote an example here for Chaz: http://forums.ni.com/t5/NI-TestStand/How-to-execute-two-steps-in-parallel/td-p/1449874
    It's the second example that's attached.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    AccessLocalVar.JPG ‏67 KB

  • How to use local variable in member formula?

    Hi Expert,
    We would like to use a {local variable} in a member formula, so that it can pick up the prompt from webform upon save. Would like to know if it is possible to do? If so, what is the correct syntax?
    We attempted to use brace {scenario}, blacket [scenario], blacket with quote ["scenario"]. None of these work.
    We are using 11.1.2.1 version, EPMA, Hyperion Planning.
    Thanks in advance for your help!

    One other pointer. Where did you define your variable? Hopefully you went into Calc Manager and selected <Tools>, <Variables>. From there, navigate to your application or database. Right-click on your application or database and select "New". In the bottom panel, you'll need to select your Variable Type. Make sure you select "Member", and not "Members". You cannot pass "Members" (plural) to a web input form. Also, if you want to define a variable for a custom dimension, you'll need to do it at the database level. Standard dimension member variables can be defined at the app level. (Not sure why this is the case, especially when my custom dimension exists in all plan types . . . . )
    Anyway, hope this helps,
    - Jake

  • How to use local variables declared in b/t the methods in other views

    Hi
    i need to use the value of the local variables declared in b/w the views in one other view,as i have manipulated the value based on some condition & want to use it in 1 more view for my req.,but that variable is not global one just for once i need to use it,and i can't again write the whole for its conditions,as its there in initialization view,which if coded again,can hit the functionality there,so is it possible to use the value of such local variables thereafter or not,if yes pls let me know,or i need to declare the global variable for this.

    hi,
    1.Declare an Attribute in Component controller.
    2. Pass the value to this Attribute in View V1.
             using :
      wd_comp_controller->Att = 'Saurav'.
    3. Now in view2 , you can access this Attribute using:
      data lv type string.
         lv = wd_comp_controller->Att .
    Here Att is my attribute of type string declared in component controller.

  • Error in Local Variable Creation in BPEL

    Hi,
    In BPEL, we can easyly create[b] local variable of simple type.
    But i want to create complex type variables that can be used for my internal purpose.
    But it is giving error , if i try to do so.
    Could you please give me some inputs of how to create a[b] complex type local variable in BPEL process.
    Thanks in advance

    define a complex type in the process XSD ..
    then, make the local variable ..

  • How to solve error essbase encoding ?

    Dear All,
    Today, I just wanted to load data into a demo database, however, I found that the load information of data load results is error encoding as below:
    ÕýÔÚ¶ÁÈ¡Êý¾Ý¿â [Demo] µÄ¹æÔò SQL ÐÅÏ¢
    ÕýÔÚ¶ÁÈ¡À´×ÔÊý¾Ý¿â [PLP] ¹æÔò¶ÔÏóµÄ¹æÔò
    ÆôÓÃÁ˲¢ÐÐÊý¾Ý¼ÓÔØ: [1] ¿é×¼±¸Ị̈߳¬¶ø [1] ¿éдÏ̡߳£
    ¼ÓÔØ´ËÊý¾ÝÎļþδÐÞ¸ÄÈκÎÊý¾ÝÖµ
    [LoadData.rul] µÄÊý¾Ý¼ÓÔؾ¹ýµÄʱ¼ä: [9.516] Ãë
    Êý¾Ý¿âµ¼ÈëÒÑÍê³É ['ZZTest'.'Demo']
    ÒÑ×¼±¸ºÃÊä³öÁÐ: [0]
    Of course, I modified the env variable ESSLANG from English_UnitedStates.Latin1@Binary to SimplifiedChinese_China.MS936@Binary. What a pity, it doesn't work.
    As you know, the Essbase Language was set to SimplifiedChinese_China.MS936@Binary when configuring.
    So, who knows how to solve it ?

    Open log with utf8 text editor
    u can remove chines localization if copy to bin files from C:\Hyperion\products\Essbase\EssbaseServer\localized\en\bin

  • How to solve "error occurred in the data manipulation engine"? 64bit Windows 7

    Hi all
    I'm having quite a testing time here trying to use the new SAP PA 2.0. After installation the software launches, the Automated Analytics seems to work fine but not the Expert Analytics.
    Steps as follows:
    Launch PA
    Choose and launch Expert Analytics
    Choose Try with Samples
    Open the Dairy Wholesaler file
    Error: An error occurred in the data manipulation engine. Check the manipulation parameters. (HDB 01001)
    I also get this same error when I try to create my own New Dataset.
    I’m on 64bit Windows 7 Pro
    Is there anyone who knows how to solve this problem. I've searched the SCN and online and have tried the following:
    1. Uninstall and re-install. Doesn't help
    2. Uninstall and delete old lumira related folders on the C drive e.g. the SAPPA and SAPVI folders on the C drive, then re-install.
    Much appreciated if anyone could shed some light on this. I've previously had Lumira working with no issues. I've since uninstalled Lumira, Predictive Analytics, and Infinite Insights (as PA 2.0 is all of this combined)
    Regards
    Ria

    In case anyone has the same problem, I found the the following helpful (taken from Error after upgrading to 1.18 ). The solution is for Lumira however its the same steps for PA2
    1.  You might want to try a ‘clean’ uninstall / reinstall . After uninstalling, try deleting these folders:
    C:\Users\Public\sapvi
    C:\Users\<user>\AppData\Local\SAP\Lumira
    C:\Users\<user>\AppData\Local\Temp\sapvi
    In this step I searched for every SAP related file in AppData in the Public, User, and my own username folder under \Users\
    2.  Next, to launch the application, explicitly click "Run as Administrator" on the install file

  • Using local variables to "clean up" diagram

    I have attached a photo with red circles indicating my use of local variables to "clean up" a block diagram. Would I run into any issues doing this? Can I leave this task and error unwired?
    -Sarah
    Solved!
    Go to Solution.

    I see some possibly really bad race conditions with your VISA Resources.  For instance, if Task Out 3 is empty (by default), it is likely that the local to read will happen before the local to write.  What this will turn into is you loosing your VISA Reference in the shift register.  Use wires.  Locals very rarely clean up your diagram.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • Data Acquisition - using local variables to write data to a file

    Hello,
    I am running a Data Acquisition vi (currently in LabVIEW 7.1 but soon to be updated to 8.2) that collects ~100 parameters of data from several sources contained in a while loop. The current configuration (which I did not write) uses very few subVIs and writes to ~100 local variables to store each parameter. It then reads all the local variables and builds an array of all the strings, converts then to a spreadsheet string, then uses the write characters to file function to append to a datafile. I am trying to clean things up and have came up with subVIs to collect the data from the following sources:
    8 serial port sources collecting btwn 8 and 20 parameters each
    ~15 thermocouple readings
    ~10 analog inputs
    ~20 parameters read off an ARINC 429 bus.
    I have come up with a subVI to read each of the sources and have placed the subVIs in the while loop. Each subVI outputs the data that it collects in array or cluster form. I was wondering how best to write each parameter to a CSV file at between 1 and 10 Hz. Should I write each subVI output to a LV and then read them off as was done before (the difference being that I have reduced the # of LVs to ~10 vs >100?
    I should add that precise timing is not that important, so if all the subVIs are not collecting simultaneously (which I understand that they won't be), it does not really matter.
    Thanks.

    Hi jilla,
    jilla wrote:
    What I think that you are saying is to turn the outputs of the 4 subVIs into inputs of a 5th subVI that writes to the data file. Correct?
    Yes.  It may sound like a fine-point, but I beileve it's better to create a VI specifically for formatting data - in your example, 4 arrays IN, a single string OUT.  Then write the string to file as a seperate operation.  GUI-displayed data can go through a similar transformation, the four arrays wired to a subVI which builds output-structures specifically for display.  It's a beginner's mistake to put lots of individual controls and indicators on the screen when groups of them are naturally related (in an object-oriented sense.)  Use clusters to group related controls - this will keep the diagram much cleaner.
    One more question: at what point (either # of data points or frequency of data collection) does it become necessary to use queues? Thanks.
    Well, there's not really a clearly definable "point".  I'd say if your update-rate climbs above 100Hz, or you witness poor program or system performance, then it's time.  The scenario you've described is a fairly simple acquire/display&log loop - and simple is good.   Then-again people can't see/react-to updates faster than about 10Hz - so it doesn't make sense to sacrifice performance - if performance becomes an issue.
    Re: queues:  Queues are sometimes used to buffer data that's "produced" in one place and "consumed" in another.
    Here, if/when logging data, you're logging with every DAQ.  I wouldn't recommend using a queue to transport data from a "DAQ loop" to a "Logging-loop" - those functions can be in the same loop.  Should/could a queue be used to get data from a "DAQ loop" to update the GUI at a lower frequency?  Sure, but a Notifier might be a better choice.   Further, in the (simple?) program you've described, you might use a case structure (True/False) to only update FP indicators every "X" iterations - a simple solution that doesn't require Queues or Notifiers.
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • How to solve Error in http connection. Error -1

    urlMidlet2===http://localhost:8080/testProj?userId=20&selMPBL=23&svMPBL=IPOD+Touch+Screen+e!1!Tue+Jan+06+00:00:00+UTC+2009!Tue+Jan+06+00:00:00+UTC+2009!Sat+Jan+31+00:00:00+UTC+2009!Mp3+Player!IPOD!Rejected!12
    [j2mepolish] Generic/DefaultColorPhone: !1!2!1222!13333
    [j2mepolish] Generic/DefaultColorPhone: Protocol for this connection is http
    [j2mepolish] Generic/DefaultColorPhone: This object is connected to localhost host
    [j2mepolish] Generic/DefaultColorPhone: HTTP Port in use is 8080
    [j2mepolish] Generic/DefaultColorPhone: respCode=====-1
    [j2mepolish] Generic/DefaultColorPhone: Error in opening HTTP Connection. Error#-1
    Why is this error coming? How to solve it?
    Thanks in advance.
    Edited by: J2me_Beginner on Jun 7, 2009 9:38 PM

    I am making a form using an interface. When Activate the Form, I got this error:
    Invalid HTTP connection: ADS
    Message no. FPRUN000
    But I do not know how to solve or config ADS. Any one know how to slove this error ?
    Thanks a lot.

Maybe you are looking for

  • How do I get my printer to print only on one side of the paper?

    I want to print only on one side of the papger.  But machine prints out on both sides.  When I remove the duplexer at back of machine, the paper flies out the back and printing error says no paper.  I'm going nuts.   I am a writer and can only submit

  • How to SaveAS and SaveAs on different volume in TextEdit?

    i am having a bit of a battle with the new features for saving in Lion and while i /sort/ of get it i am not doing very well in TextEdit. wondering if someone wouldn't mind helping me out. i have created a new document and upon running the first Save

  • How do i update bootcamp drivers

    my windows 8.1 says I need to update the support drivers for bootcamp, how do I do this?

  • Attaching an embedded movie clip to an empty one

    HI, I am new to Flash and would like some help about the following. A have an embeded movie clip in my library that i want to attach to an empty movie clip I am creating with ActionScript. I want to fix the size of the empty movie clip, that I will u

  • Nokia N97 Contacts search FAILURE

    Am I the only one who is totally disappointed by Nokia? Isn't this mobile meant for making calls in the first place? Whenever I enter to contacts and when I want to search for a contact between my at least 400 contacts, it is useless to use the fast