Problem when writing a value to an enum

Hi together,
I'm facing a problem when using an enum in my state machine.
From time to time, the value (which represents the next state) which comes from the
shiftregister, is not stored correctly into my enumvariable.When I probe point "1",
a different value is shown than the variable "states" contains.
Does anybody has an idea? Thanks.
Message Edited by maximint on 02-09-2009 06:20 AM
Attachments:
Clipboard-1.png ‏6 KB

There are other ways to get the string-value of an enum (format into string with a %s formatter for instance).
But I have no idea what you are seeing.
However I would not use the enum to string technique chose you have, just add the enum to the 'file' VI as an input.
And the =0 comparison you have is useless, add the enum to the case structure as the selector.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • Problem when defaulting a value to the field

    Hi CRM Experts,
    I am new to CRM, i am facing a problem when defaulting a value to the field in the Tcode 'SOLMAN_WORKCENTER' (Solution Manager Server).
    when i am defaulting it is displaying fine in the view( Redefined the getter method there i passed the value), i set a break point in the getter method when i am executing the getter method i am unable to get the defaulted value in the importing parameter value, but i am getting the value here when i used to type manually in the filed, i cant understand why it is behaving like that? please can any body help in this regard...
    Thanks in advance
    Hari..

    There are other ways to get the string-value of an enum (format into string with a %s formatter for instance).
    But I have no idea what you are seeing.
    However I would not use the enum to string technique chose you have, just add the enum to the 'file' VI as an input.
    And the =0 comparison you have is useless, add the enum to the case structure as the selector.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Problem when writing table:c_t_variables

    Hi Everyone,
    I have a typical workbook issue and the following were the issue points:
    1. A user have saved his workbook in the shared drive and trying to give access to all the users who have access to this drive. For this there is a option in Excel->tools(Menu)>Share workbook and check the Check box.
    2.Now when he accessing the workbook via Business Explorer. The moment he refreshing one the query in the workbook it giving a pop Error message.
    Business Explorer<internal Error> Problem when writing table: C_T_VARIABLES.
    It's wierd issue for me and haven't come across this error before.
    Please look into this issue and let me asap if there is any solution for this.
    Thanks,
    It's very Urgent

    Hello,
    where I can find
    Excel Options >> Complements >> Manage Excel Complements >> Go >> Deactivate Euro Tools.
    thanks

  • internal error problem when writing table:

    Hi,
    When my user try to access BEx queries, he is getting the following pop up messages
    <internal error> problem when writing table: C_T_VARIABLES
    <internal error> problem when writing table: E_T_DIM
    <internal error> problem when writing table: E_T_MEM
    <internal error> problem when writing table: E_T_ATR
    <internal error> problem when writing table: E_T_PRPTYS
    <internal error> problem when writing table: C_T_HRY_TYPES
    <internal error> problem when writing table: E_T_CEL
    <internal error> problem when writing table: E_T_FAC
    <internal error> problem when writing table: E_T_CON
    <internal error> problem when writing table: E_T_DRILL
    and then report is getting diplayed. and when user try to edit properties again same pop up messages are coming.
    when I access queries from my machine those are working fine..
    Can some one help me to solve this ?
    Regards,
    Harish

    Hi Harish,
    Please go through following relevant threads ::
    http://forums.sdn.sap.com/thread.jspa?threadID=137355
    http://forums.sdn.sap.com/thread.jspa?threadID=644834
    http://forums.sdn.sap.com/thread.jspa?threadID=1199718
    http://forums.sdn.sap.com/thread.jspa?threadID=36530
    Regards,
    Arpit

  • Email address problem when writing an email

    Recently I update my OS to the v5.0. I like it very much, but since that. I have a problem when I redacting a new email. When I want to add the destinatary the BB doesn't search for any address on the device... I have to copy-paste the address, then press enter, and after I do that, the BB change the email address for the contact name...
    Please help!!
    Thanks!!
    MO

    Click the + button to the right in the address field.

  • Problem when Entering Decimal Values at Input Ready Query

    Hi Everyone,
    I have created Input ready query but when I am going to enter decimal values in input cell it takes as a round of value.
    Example:- If I enter 1.234 value at input cell it takes as a 1 or if I enter 1.789 value then it takes as a 2 at cell.
    The technical properties of Key Figure at Info object level is,
    Radio Button :- Decimal
    Drop Down :- FLTP (Floating Point)
    But we want to whatever value will enter at input cell, the same value will save at real time info cube level.
    Requirement :- If I enter 1.234 value at input cell it needs to take as a 1.234
    Please suggest your comments/views.
    Thanks
    Kind Regards
    Anukul

    Hi Giradkar,
    Check the setting of the UOM you are using in table 'T006' there are 2 fields that indicate how to display and how to store the values with respective UOM.
    Regards,
    Eitan.

  • Problem when writing tables: C_T_VARIABLES

    Hello,
    I've checked the forum regarding this problem without finding any good solution.
    We have a problem to refresh a 3.5 Workbook when we try to refresh the whole WB. We have these errors :
    When we try to refresh the query one by one everything is working fine. We have also tried to migrate the workbook on 7 and it works fine (it's not a solution on our case because some users are still in 3.5 version).
    We have tried to disable all plugins on Excel without success. There's a SAP note regarding this problem but only with Excel 2007 and we are using Excel 2010.
    Do you have any clue about the problem ?
    Regards,
    Raito.

    Thanks for your answer.
    When you say regenerate in rsrt what do you mean ? I need to launch the request throught RSRT with the button "Execute" or "Generate report" ?
    I've tried to "generate report" with all my queries but i still have the same issue.
    Regards,

  • Problem when getting attribute value.. pls respnd

    Hi friends,
    I have a table with one field drop down. I created a node and subnode(for dropdown, and assinged a supplyfunction), and binded the table.
    When WDA loads, the data is populating correctly.
    When i click ADD new ROW, i am reading the current(row of table) values and storing in a table.
    to read dropdown, im using the below code:
    node_serv_prod = wd_context->get_child_node( name = wd_this->wdctx_serv_prod ).(main node)
      node_prod = node_serv_prod->get_child_node( name = wd_this->wdctx_prod ).(subnode).
      node_prod->get_static_attributes(
      EXPORTING
        index  = prev_line
        IMPORTING
          static_attributes = stru_prod )
    WHen the control goes to get_static_attribute, and when i hit F5 in debuggin, it is going to supplyfunction of subnode dropdown. which i dont want. because it is not giving the current row's value of drop down.
    Basically i want to read the current row's drop down value, when i click add new row button.
    Kindly pls tell me how can i do this.
    pls respnd.
    thanks in advance.. friends
    Niraja.

    Hi Niraja,
    Am not clear as to why you have created a subnode just for populating some values for your dropdown. You could have just created a normal attribute under the same node which you are binding to your table. You could have then typed this attribute with a domain having your desired values as its fixed values or else you could have coded within the WDDOINIT method like something shown below:
    data: lr_node_info type ref to if_wd_context_node_info,
            wa_value_set type wdr_context_attr_value,
            lt_value_set type table of wdr_context_attr_value.
      lr_node = wd_context->get_child_node( name = 'NODE' ).
      lr_node_info = lr_node->get_node_info( ).
      wa_value_set-value = '1'.
      wa_value_set-text  = 'One'.
      insert wa_value_set into table lt_value_set.
      wa_value_set-value = '2'.
      wa_value_set-text  = 'Two'.
      insert wa_value_set into table lt_value_set.
      wa_value_set-value = '3'.
      wa_value_set-text  = 'Three'.
      insert wa_value_set into table lt_value_set.
      lr_node_info->set_attribute_value_set( name      = 'TEMP'
                                             value_set = lt_value_set ).
    Your control does rightly enter into the supply function. When you are trying to add a new row you are basically trying to add a new blank entry to your internal table which is bound to your table. Now for this dropdown you have bound it to a subnode & this node has a supply function attached to it. You should keep it in mind that the supply function does get automatically triggered when:
    1) The node collection is initial.
    2) The lead selection in the parent node collection is changed.
    3) The node collection is invalidated programmatically.
    If you had used the approach of binding your dropdowns to an attribute created directly under the same node which you are using to bind to your table then even any newly added rows would automatically get the set of values populated inside them.
    Regards,
    Uday

  • Problem when Reading Multiple values from Arduino to Vb

    Hi Mates,
    I am getting 4 values from Arduino using Serial.Println statement 4 times. How do I need to receive these values to 4 different variables in VB without using any buttons. We have to serial data received as per my knowledge.
    I've written the following code in VB.
    Imports System
    Imports System.ComponentModel
    Imports System.Threading
    Imports System.IO.Ports
    Public Class Form1
        Dim myPort As Array  'COM Ports detected on the system will be stored here
        Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to prevent threading errors during receiveing of data
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            SerialPort1.PortName = "COM5"         'Set SerialPort1 to the selected COM port at startup
            SerialPort1.BaudRate = 9600         'Set Baud rate to the selected value on
            SerialPort1.Open()
            'Timer1.Start()
        End Sub
        Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
            ReceivedText(SerialPort1.ReadLine())    'Automatically called every time a data is received at the serialPort
        End Sub
        Private Sub ReceivedText(ByVal [text] As String)
            'compares the ID of the creating Thread to the ID of the calling Thread
            If Me.rtbReceived.InvokeRequired Then
                Dim x As New SetTextCallback(AddressOf ReceivedText)
                Me.Invoke(x, New Object() {(text)})
            Else
                Me.rtbReceived.Text &= [text]
            End If
        End Sub
    End Class
    How do I need to differentiate the values in ReceivedText function and How can I display those values in 4 text boxes. I am able to display all the values in rtbReceived text box as 100200300400100200300400... So on
    Assume values from Arduino are 100, 200, 300 & 400
    Your suggestions would be more helpful to complete my project, Thanks in Advance
    Thanks,
    Santhosh

    How do I need to differentiate the values in ReceivedText function and How can I display those values in 4 text boxes. I am able to display all the values in rtbReceived text box as 100200300400100200300400... So on
    Assume values from Arduino are 100, 200, 300 & 400
    Based on the example you have provided you would simply use the String.Substring function to break the string apart ot every 4 characters.
    https://msdn.microsoft.com/en-us/library/aka44szs%28v=vs.110%29.aspx
    You could do that in a loop that changes the starting character position from 0 in an increment of 4.
    However I suspect that won't work properly, either because there are characters that you are not revealing as a result of the way that you are display your results, or because your data gets out of sync. 
    If your device sends synchronizing characters (such as an end-of-record byte, or perhaps just a CrLf) then the correct process is to append (not overwite) the text you receive.  Use a string, not a text box text property, for this buffer. Then you need
    to break apart this buffer by scanning forward until you find a complete message - a record identifier and enough (12?) following characters to create a full sentence.  Then break it apart using substrings.
    If your device data stream does not include something that marks the beginning or end of a complete transmission then you can still try breaking it apart every four characters, and see how reliable it is.

  • OPC DataSocket error 42 in writing negative values

    I was playing around with OPC and using the DataSocket pallete. Although I've used it reliably for a while and am content, I was baffled by one error. I was hoping someone could explain why this error occurs or how to solve it.
    In the NI Distributed System Manager I've created an Shared Variable of the type single, with Read/Write access.
    Problem
    When writing a value less or equal to 0 to an OPC URL, I get an error 42. When using the equivalent PSP URL, I don't get it.
    Using this VI snippet code.
    I get these paths and errors:
    This error 42 comes for all values below zero and for zero. For all positive values I don't get this error. What's the reason for this behaviour? In my humble opinion this is not wanted behaviour, as OPC tags should accept the whole value range of the single.

    White spaces are allowed in OPC URLs, so that cannot be the issue.
    I've tested with another LV2013 computer and NI Distributed System Manager 2013 and got the same errors. However, when I tested it on a LV2012 and NI DSM 2012 it was all working. Quite strange.
    Now I'm wondering if it's something local or that the bug was introduced in the 2013 distribution and if it has been solved in the 2014 version ...
    Could someone test it on LV2013 and/or LV2014, just to check if the problem occurs for other installations in LV2013 and if the problem has been solved in LV2014? Please indicate LV version and DSM version.

  • Problem with Arabic font: In certain contexts, when writing Arabic with vowel signs (fatha, damma, kasra, sukun) a sequence of sukun   fatha/damma etc. would reverse automatically. Is this a known bug?

    Problem with Arabic font: In certain contexts, when writing Arabic with vowel signs (fatha, damma, kasra, sukun) a sequence of sukun + fatha/damma etc. would reverse automatically. Is this a known bug?
    Example: عَيْنٌ
    would automatically convert to عَيُنْ
    Funnily, it doesn't seem to happen here, but it does when entering text in a web interface (using Firefox, font Bayan) and when using Text Edit.
    Seems to be a problem of a specific font, as e.g. Arial MS Unicode works fine. Any hints?
    Thank you!

    Musaafir wrote:
    I've no idea how i can even start using arabic vowels on Microsoft Word for Apple
    You can't do Arabic on MS Word for Mac.  This app has never supported RTL scripts, so you need to use something else.  Mellel is best, but Pages 5, TextEdit, Nisus Writer, Open/LibreOffice should work OK.
    You switch between languages by using the "flag" menu at the top right of the screen or by using the keyboard shortcuts apple/command plus space.  Go to system prefs/keyboard/shortcuts to make sure that is activated.
    To see which key does what, you use Keyboard  Viewer.
    http://support.apple.com/kb/PH13746
    You place vowels on letters by typing the key for the vowel after the key for the letter.  The vowels are on the option/alt keys, option/alt + a gives you َ

  • Problem when querying OLAP for Value based hierarchy

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

  • I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?

    I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?
    Thank you for help
    Lohkaeo

    Oops - for some reason, this problem now seems to have gone away. May have had something to do with Flash. I'll keep my fingers crossed.

  • Orange mail software problem when using distribution lists : some lists cannot be used for writing e-mails. The problem does not exist when using Internet Explo

    When writing an e-mail directly on the Orange e-mail service (not on Thunderbird) I am facing the following problem : some distribution lists cannot be used to complete the adressees. The same lists can be used without difficulty if I use Internet Explorer instead of Firefox. The Orange hotline told me that probably my Firefox version was not updated. Unfortunately I checked that, and apparently the automatic updating works. I have also updated the plug ins, without any result.

    Please could you specify which webpage you mean ?
    The process with Orange is the following :
    - 1. click on "Write an e-mail" on the mail webpage
    - 2. click on "To" to reach the Contacts which opens a new window
    - 3. click on "Distribution lists"
    - 4. click on the selected list then click on "add". The list appears ot the box corresponding to the addresses .
    UNTIL THEN EVERYTHING WORKS WELL
    - 5. click on the button "validate", which closes the window previously opened and normally
    - 6. reloads the initial page with the complete list on the line "To". Instead of that I get the last e-mail address I previously used .
    Question : at which step of this process should I try your suggestions ? I tried when the initial page was reloaded with the wrong address, but it did not work to get back the rignt distribution list;
    Note that the whole process functions with OTHER Distribution lists. The only difference is that the problematic one has a larger number of adresses (62) however inferior to the maximum indicated by Orange (100).
    I also remind that there is no problem when using Internet Explorer instead of Firefox.
    Thanks for your help !

  • How to tackle the dataflow problem when Value Change event always triggers after another GUI event

    We know that Value change event always triggers after another GUI event. Eg, the user modifies string control, the user clicks on a boolean control. Then event boolean clicked is triggered before event string control value change.
    Now suppose somehow the GUI event that must happen to subsequently trigger the Value change event can potentially affect the data that Value change event is supposed to work on. How can we tackle this problem ?
    For example, in a mockup application that the grand purpose is to have user entered values in a textbox logged to a file (no missing information is accepted, and there is a boolean to determine how the information is logged).
    There are 2 controls, boolean A when clicked (mouse down) will load random number in text box B. Text box B is designed with event structure VALUE change which saves whatever values user enters into text box B to a log file.
    There are 3 problems when instead of clicking anywhere on the front panel after modifying text box B, the user ends up clicking on boolean control A.
    1. Event mouse down on Boolean control A will execute first, modifying text box B content before the user entered values in B get saved.
    2. The value of boolean A can potentially affect how textbox B is loggged.
    3. The value of boolean A affects how the file is logged and this is indeterminate. Somehow when running this VI with no Highlighting, the textbox B Value change event executes -before- boolean A value is updated (F to T). When running this VI with Highlighting, the boolean A value is updated (F to T) (because we click on it) -before- textbox B value change event occurs. Why is it like this ?
    Now the situation I made up seems non-sense, but I believe it resembles one way or another a problem that you might run into. How would you solve this problem elegantly ?
     

    You can set the string control to "update while typing".
    Are you sure appending the log to itself is reasonable? Wouldn't it grow without bounds if the users keeps entering strings or pressing the ingore button?
    Why isn't the "constant" a diagram constant instead of a control. Is the user allowed to change it?
    To reset just write empty strings or a false to local variables of the controls (renit to defaults" seems a bit heavy handed).
    All you probably need is a single event case for "ignore:value change" and "String" value changed", no need for the local variable..
    Also add a stop button and an event for it.
    You don't need the timeout event.
     

Maybe you are looking for

  • Error while install IM with LDAP repository

    Hi, like the title says, I am getting error immediately when deploy idm.war on sjsas(glassfishv2): Starting internal database server ... com.waveset.util.ConfigurationError: ==> java.sql.SQLException: Connection is broken: java.lang.OutOfMemoryError:

  • WebDynpro ABAP : Error when calling ME23N with URL

    Hi all, I have some problem with my WDA. I have an ALV in web dynpro and it displays Document number for Purchase Order. When a user clicks on it, we call SAP WEBGUI using ITS and I create dynamically URL to display the document. But I can't set the

  • Can't see my USB Devices in Finder.

    I am running the latest update of OS X Yosemite and within the past couple days, I can no longer see my plug in devices, ie. External Hard Drive, DSLR camera, etc. When I pull the plug out of the usb port, I get a message that says I didn't eject the

  • Combining selectOneRadio with other content but text?

    Hi! I got a quite simpel task I am currently not able to manage with JSF. I want to combine some Radio-Buttons with content like images or video, simply showing a radiobox in front an image and another and so on. So in terms of JSF i thought i had to

  • Cost center plan

    Hi all, Is it possiable to control the plan figures for cost center/profit center. Please let me know, i to achieve it. Thanks a tone in advance. Chandu