Error in NI's 'Threshold 1-D array'?

I was using this VI to find zero crossings and when I use one in my VI it seems to work fine. If I add a second only one of them works. It switches between which one actually works. I looked at the old version of the program that I am rewriting, it was written in LabVIEW 6i, and found a VI someone created that said it fixxed an error in teh Threshold 1-D array. My question is if this was known in 6i why wouldnt it be fixxed by now? Maybe other people havent came across this or I am just wrong. Just curious either way. I will attach the VI that claims to fix this problem
Attachments:
Threshold.vi ‏27 KB

OK, the only known problem for "threshold array" is documented in the online help: "... and it might return incorrect data if threshold y is less than the value at start index". Does this apply to your data?
I don't think it has anything to do with the number of calls on the diagram, but is an inherent limitation. The array must start with values below the desired threshold.
Your "fixed" VI basically searches the array until the data goes from negative to positive, then starts the "threshold array" at the index of the last found negative value, ensuring that the limitation does not apply. For some reason it jumps through quite a few uneccessary hoops doing so. All the stuff with bundling is not needed, it does not make sense. I have included
a cleaned-up version below. See if this works for you. (llb contains both VIs, I also did a few minor changes to the main vi for simplicity).
As a more general comment, I think there might be better ways to determine a phase shift. How does your data typically look like? (e.g. amount of noise, presence of other frequencies, DC offsets, etc. all will cause serious problems with this simplistic approach).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Not_NotWorking.llb ‏32 KB

Similar Messages

  • Property List error: Unexpected character b at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.

    Hi,
    I have a MBP 13' Late 2011 and Yosemite 10.10.2 (14C1514).
    Until yesterday, I was using Garmin ConnectIQ SDK and all was working fine.
    Yesterday, I've updated my system with latest security updates and Xcode updates too (Version 6.2 (6C131e)).
    Since, I can't launch the ConnectIQ simulator app, I have this message in console :
    8/04/2015 15:19:04,103 mds[38]: There was an error parsing the Info.plist for the bundle at URL Info.plist -- file:///Volumes/Leto/connectiq-sdk-mac-1.1.0_2/ios/ConnectIQ.bundle/
    The data couldn’t be read because it isn’t in the correct format.
    <CFBasicHash 0x7fa64f44e9a0 [0x7fff7dfc7cf0]>{type = immutable dict, count = 2,
    entries =>
      0 : <CFString 0x7fff7df92580 [0x7fff7dfc7cf0]>{contents = "NSDebugDescription"} = <CFString 0x7fa64f44f0a0 [0x7fff7dfc7cf0]>{contents = "Unexpected character b at line 1"}
      1 : <CFString 0x7fff7df9f5e0 [0x7fff7dfc7cf0]>{contents = "kCFPropertyListOldStyleParsingError"} = Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it isn’t in the correct format." (Conversion of string failed.) UserInfo=0x7fa64f44eda0 {NSDebugDescription=Conversion of string failed.}
    I have looked at this file and it looks like a binary plist
    bplist00ß^P^V^A^B^C^D^E^F^G^H
    ^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_ !"$%&'()'+,^[\CFBundleNameWDTXcodeYDTSDKName_^P^XNSHumanReadableCopyrightZDTSDKBuild_^P^YCFBundleDevelopmentRegion_^P^OCFBundleVersi    on_^P^SBuildMachineOSBuild^DTPlatformName_^P^SCFBundlePackageType_^P^ZCFBundleShortVersionString_^P^ZCFBundleSupportedPlatforms_^P^]CFBundleInfoDictionaryVersion_^P^RCFBundleE    xecutableZDTCompiler_^P^PMinimumOSVersion_^P^RCFBundleIdentifier^UIDeviceFamily_^P^QDTPlatformVersion\DTXcodeBuild_^P^QCFBundleSignature_^P^ODTPlatformBuildYConnectIQT0611[iph    oneos8.1o^P-^@C^@o^@p^@y^@r^@i^@g^@h^@t^@ ^@©^@ ^@2^@0^@1^@5^@ ^@G^@a^@r^@m^@i^@n^@.^@ ^@A^@l^@l^@ ^@r^@i^@g^@h^@t^@s^@ ^@r^@e^@s^@e^@r^@v^@e^@d^@.V12B411RenQ1V14C109Xiphoneos    TBNDLS1.0¡#XiPhoneOSS6.0YConnectIQ_^P"com.apple.compilers.llvm.clang.1_0S8.1_^P^Tcom.garmin.ConnectIQ¡*^P^AW6A2008aT????^@^H^@7^@D^@L^@V^@q^@|^@<98>^@ª^@À^@Ï^@å^A^B^A^_^A?^AT^    A_^Ar^A<87>^A<96>^Aª^A·^AË^AÝ^Aç^Aì^Aø^BU^B\^B_^Ba^Bh^Bq^Bv^Bz^B|^B<85>^B<89>^B<93>^B¸^B¼^BÓ^BÕ^B×^Bß^@^@^@^@^@^@^B^A^@^@^@^@^@^@^@-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^Bä
    I guess it is a normal format but my system seems to be unable to read binary plist ?
    I tried some stuff with plutil
    plutil -lint Info.plist
    Info.plist: Unexpected character b at line 1
    Same for convert
    plutil -convert xml1 Info.plist
    Info.plist: Property List error: Unexpected character b at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
    I also try to download a fresh version of the connectIQ SDK and no changes.
    Any idea ?
    Thanks

    Step by step, how did you arrive at seeing this agreement?

  • Error opening web analysis report in workspace: Array index out of range:2

    I am able to view this report in web analysis studio with no errors..Its only when I go to workspace and open report do I get following error: Array index out of range:2.
    Any suggestions?

    Have you tried checking the "Design for HTML" from the Edit toolbar to see if you get any error when saving?
    Do you have any advanced items on the report, as there are 4 types of differences between Studio and HTML:
    - font differences, Workspace (DHTML) uses the WA Server fonts whereas WA Studio client machine fonts.
    - Service Buttons are very restricted using Workspace
    - Display: Tab selection, Splitter panels, Slider selection do not render in Workspace
    - Cannot restrict WA Tools menu in Workspace at all, where you can in the Studio.
    For exact details check out the Hyperion Web Analysis Studio User’s Guide from the Doc Library:
    http://download.oracle.com/docs/cd/E10530_01/doc/nav/portal_4.htm

  • Error meesage on UI sCannot insert/update Array without context information

    Hi All,
    As soon as page runs , i m getting the below error on server logs and also getting the same error once page page loads , user click on SellectmnayListBOx components on screen .
    Appriciate if any inputs on this . using ADF6 .
    <ApplicationModuleImpl> <doPoolMessage>
    oracle.jbo.AfterRollbackException: JBO-26102: An error occurred after rollback was performed.
         at oracle.jbo.server.DBTransactionImpl.rollback(DBTransactionImpl.java:2595)
         at oracle.jbo.server.ApplicationModuleImpl.resetState(ApplicationModuleImpl.java:4840)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:336)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9084)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4607)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.resetApplicationModule(ApplicationPoolImpl.java:2026)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.removeSessionCookie(ApplicationPoolImpl.java:879)
         at oracle.jbo.common.ampool.SessionCookieImpl.removeFromPool(SessionCookieImpl.java:711)
         at oracle.jbo.common.ampool.SessionCookieImpl.destroy(SessionCookieImpl.java:650)
         at oracle.jbo.common.ampool.SessionCookieImpl.timeout(SessionCookieImpl.java:697)
         at oracle.adf.model.bc4j.DCJboDataControl.releaseImmediateAMUnmanaged(DCJboDataControl.java:2525)
         at oracle.adf.model.bc4j.DCJboDataControl.releaseApplicationModule(DCJboDataControl.java:2429)
         at oracle.adf.model.bc4j.DCJboDataControl.release(DCJboDataControl.java:903)
         at oracle.adf.model.dcframe.DataControlFrameImpl.release(DataControlFrameImpl.java:364)
         at oracle.adf.model.BindingContext.resetState(BindingContext.java:637)
         at oracle.adf.model.BindingContext.release(BindingContext.java:609)
         at oracle.adf.model.servlet.HttpBindingContext.valueUnbound(HttpBindingContext.java:77)
         at weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:720)
         at weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.java:702)
         at weblogic.servlet.internal.session.SessionData.remove(SessionData.java:976)
         at weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(MemorySessionContext.java:69)
         at weblogic.servlet.internal.session.SessionContext.invalidateSession(SessionContext.java:475)
         at weblogic.servlet.internal.session.MemorySessionContext$SessionCleanupAction.run(MemorySessionContext.java:114)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.session.MemorySessionContext.destroy(MemorySessionContext.java:90)
         at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3220)
         at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:247)
         at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)
         at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1535)
         at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:507)
         at weblogic.application.internal.flow.ModuleStateDriver$2.previous(ModuleStateDriver.java:387)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
         at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)
         at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)
         at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.previous(DeploymentCallbackFlow.java:547)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:192)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:184)
         at weblogic.application.internal.BaseDeployment$2.previous(BaseDeployment.java:642)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
         at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
         at weblogic.application.internal.BaseDeployment.deactivate(BaseDeployment.java:227)
         at weblogic.application.internal.EarDeployment.deactivate(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.deactivate(DeploymentStateChecker.java:198)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.deactivate(AppContainerInvoker.java:98)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.silentDeactivate(AbstractOperation.java:679)
         at weblogic.deploy.internal.targetserver.operations.RedeployOperation.unprepareDeployment(RedeployOperation.java:197)
         at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:120)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
         at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.jbo.JboException: Cannot insert/update Array without context information     at oracle.jbo.domain.Array.prepareForDML(Array.java:802)
         at oracle.jbo.server.ViewRowSetImpl.prepareLobObjectForBind(ViewRowSetImpl.java:8301)
         at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:5074)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1169)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1397)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1303)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1288)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7107)
         at com.tuitravelad.modelbase.bc.base.vo.TuiTravelADViewObject.afterRollback(TuiTravelADViewObject.java:168)
         at oracle.jbo.server.DBTransactionImpl.rollback(DBTransactionImpl.java:2570)
         ... 62 more
    ## Detail 0 ##
    oracle.jbo.JboException: Cannot insert/update Array without context information
         at oracle.jbo.domain.Array.prepareForDML(Array.java:802)
         at oracle.jbo.server.ViewRowSetImpl.prepareLobObjectForBind(ViewRowSetImpl.java:8301)
         at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:5074)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1169)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1397)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1303)
    Thanks

    Hi,
    this
    +"As soon as page runs , i m getting the below error on server logs and also getting the same error once page page loads , user click on SellectmnayListBOx components on screen ."+
    cannot be the full story you tell. The exception is thrown in the context of a prepareForDML, which is called on entities for the Create / Update and Delete use case. I also see a failed rollback. So there must be something you do before this happens during a page refresh
    Frank

  • Threshold and interpolate array in LabVIEW FPGA

    Hi,
    It's a classical one, but I don't find an answer that fit my problem :
    I want to threshold an array with a 4-20 mA analog input then interpolate an other array with the result of the threshold.
    The result of the interpolation is then sent to an 4-20 mA analog output.
    Very simple ! Just like that :
    But I want to do that in LabVIEW FPGA on a cRIO 9074....and these functions don't exist in LabVIEW FPGA.
    I failed to use LUT, so I need some help...
    The 4-20 mA modules give/need a single-precision floating point format.
    Thanks,

    I have already told you the solution: use the lookup table Express VI (which is implemented as a memory block). Why does this not work for you?
    The lookup table express VI includes interpolation. There is no need for thresholding. In fact, in your original example, there is also no need for thresholding. You can combine the two arrays into an array of 2-element clusters, which makes it effectively a lookup table, and wire that to the interpolate function alone.
    If you have enough RAM available on the FPGA, you can also avoid interpolation by creating a lookup table large enough to hold every possible input value (and corresponding output). Since you are dealing with a 16-bit input, there are only 65536 possible values. I realized I provided the wrong numbers in my earlier post (I was off by a factor of 2). The address is the input and the table contains the corresponding outputs, so your lookup table will consume only 65536 * 2 = 131072 bytes or 128kb of RAM (each output value is 16 bits or 2 bytes).
    I don't have the LabVIEW 2013 FPGA module available right now, and I can't find any documentation suggesting that the inputs and outputs are single-precision floating point values. Everything I see says that they are fixed-point values. Are you sure that the inputs and outputs are floating point? Can you provide a screenshot? In any case, regardless of the numeric format, you are limited by the 16-bit precision of the inputs and outputs, so you'll never have more than those 65536 possible values. If you do have to do the conversion, you can use the To Fixed Point and Fixed Point to Integer Cast functions (and the equivalents in the reverse direction). That will give you an integer with the same bit pattern as the fixed-point equivalent which you can use as an integer input to the lookup table.

  • Error when trying to join secondary to array

    Hi All,
    We had this problem about a year ago. Trying to join a secondary server to an array, we receive the following message javax.naming.CommunicationException: ErrTransportPermanent . No answer as to how it was corrected, but we were finally able to join the server into the array. Last evening we ran the 0214 Solaris 10 Recommended patch cluster, the problem has reappeared.
    Have checked the host files for IP FQDN SHORTNAME , consistant across the servers.
    Also checked /opt/tarantella/var/serverconfig/local/bootstrap.properties , consistant across servers, all showing the FQDN of each server.
    NTP checks are consistant, 2 servers in EST the other 2 CST.
    Strange in that one of the servers joined into the array is on the same subnet with the same configuration as the server giving the error.
    Any thoughts ?
    thanks
    Sun Secure Global Desktop Software for SPARC Solaris 2.8+ (4.50.907)
    Architecture code: spso0510
    This host: SunOS 5.10 Generic_144488-08 sun4u sparc SUNW,Sun-Fire-V490

    Dear Eric,
    It's Domain Joined PC.
    For 1, i deployed the CA role on the AD server, i also checked the CA, but no error report could be found.
    For 2, the Date&time are correct and sync from AD time.
    I post below blocked content, i am not sure if useful for error analyse.
    Server Error in '/lwa' Application.
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could,
    however, be viewed by browsers running on the local server machine.
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory
    of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>
    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to
    a custom error page URL.
    <!-- Web.Config Configuration File -->
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

  • Error while assigning dates to associative array of date type

    Hi All,
    I am facing the issue while assigning dates to associative array of date type:
    Oracle Version:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Stored procedure i am trying to write is as following
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0
    .. l_no_of_days - 1
    loop
        l_date_id_arr := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    I am getting error at line 14 while compiling this. and the error message is as following:
    Errors for PROCEDURE JP1:
    LINE/COL ERROR
    14/5     PL/SQL: Statement ignored
    14/22    PLS-00382: expression is of wrong type
    So while investigating this i tried to output the value of (p_start_date + i) using dbms_output.put_line and the output is date itself.
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0 .. l_no_of_days-1
    loop
        --l_date_id_arr := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    output of the
    exec jp1
    is as following:
    01-DEC-13
    02-DEC-13
    03-DEC-13
    04-DEC-13
    05-DEC-13
    06-DEC-13
    07-DEC-13
    08-DEC-13
    09-DEC-13
    10-DEC-13
    11-DEC-13
    12-DEC-13
    13-DEC-13
    14-DEC-13
    15-DEC-13
    16-DEC-13
    17-DEC-13
    18-DEC-13
    I see the output as date itself. so why it is throwing error while assigning the same to associative array of date type.
    I tried to google also for the same but to no avail.
    Any help in this regard is appreciated or any pointer some other thread on internet or in this forum.
    Thanks in advance
    Jagdeep Sangwan

    Read about associative arrays :
    create or replace procedure jp1 (
    p_start_date date default trunc(sysdate,'MM')
    , p_end_date date default trunc(sysdate)
    ) is
    l_no_of_days number;
    type t_date_id is table of date
    index by pls_integer;
    l_date_id_arr t_date_id;
    begin
    l_no_of_days := p_end_date - p_start_date;
    for i in 0..l_no_of_days - 1
    loop
        l_date_id_arr(i) := p_start_date + i;
        dbms_output.put_line(p_start_date + i);
    end loop;
    end;
    Ramin Hashimzade

  • Vector Array out of range error

    Hiya, I've run into a strange Vector out of range error when trying to splice a Vector array. The idea is to cut off the Vector array after a certain point....
    var vec:Vector.<int> = new Vector.<int>();
    vec.push(1);
    vec.push(2);
    vec.push(3);
    vec.push(4);
    vec.push(5);
    vec.splice(3,vec.length); // output RangeError: Error #1125: The index 5 is out of range 5.
    The strange thing is that it works perfectly, if I change the Vector to a regular array like:
    var vec:Vector.<int> = new Vector.<int>();    to    var vec:Array.<int> = new Array();
    Any ideas what am i doing wrong ?
    Thanks, Martin

    I don't know why it don't throw error in Array, but seccond parameter in splice method is deletecount, so you try to delete all elements start from 3 (from element 3 to element 8, but you don't have 8 elements).
    vec.splice(3,vec.length - 3);

  • Inserire il numero di errori in un array durante l'esecuzio​ne di un programma

    Salve,
    ho fatto un programma in Labview che interroga 88 dispositivi collegati in serie tramite rs 485. Durante il ciclo del programma vorrei contare il numero di ERRORI (se presenti) inserendoli internamente ad un ARRAY.
    Come posso fare?
    Grazie della cortesia

    Buon giorno,
    ho guardato l'immagine del VI e la ringrazio. Nel dettaglio allego le immagini del pannello operatore e della struttura che ho creato. 
    In pratica  devo interrogare un numero di dispositivi che va da 0 ad 88 funzionanti tramite protocollo rs485. Il ciclo è un For Loop ed il numero di volte che deve funzionare lo inserisco nella casella "N° indirizzi validi" nel pannello operatore. 
    Sempre nel pannello operatore è presente un array denominato "Errori". li vorrei inserire per il numero di errori (se presenti) per ogni ciclo. 
    Posso inserire la VI da lei inviata all'interno del mio ciclo For?
    Grazie della cortesia
    Allegati:
    Interrogo la rs485.jpg ‏147 KB
    Pannello operatore.jpg ‏76 KB

  • Run errors (is this due to arrays?)

    what possible errors could i have made with my arrays?
    java.lang.NullPointerException
            at MRoom.doRecordArrays(MRoom.java:127)
            at MRoom.actionPerformed(MRoom.java:98)
            at //i've seen what the above errors are about, though i don't know how to remedy it. but the rest down the list i don't know where to find them:
    java.awt.Button.processActionEvent(Button.java:381)
            at java.awt.Button.processEvent(Button.java:350)
            at java.awt.Component.dispatchEventImpl(Component.java:3526)
            at java.awt.Component.dispatchEvent(Component.java:3367)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:190)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:144)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

    Thanks for pointing that out :)
    i tried to trace through the methods(btw, is there a way to watch the methods? i used to take cobol-i know, that's obsolete, but, useful =P - and there's an add watch feature per step/method that lets you monitor the step by step process of your program), and i think i made an error in inserting a record into the array. I made a few modifications, but still i got the same error message. Anyway, you're right, it's hard to explain what i want in my code unless i put it(it's embarassing, that's why), so here goes a part of my code:
    ====
    IN MY MROOM class
    //in actionPerformed
              if (e.getSource() == buttSaveUpdate)
    *null pointer exception*/doRecordArrays();
              if (e.getSource() == buttSaveCancel)
         public void doRmGen()
    //               chckRmNum = new Checkbox("Room No. " + y);
                   add(new Label("Room No. "+y+" :"));
                   rmNumber=y;
                   Choice chooseRmType = new Choice();
                   chooseRmType.add("Taxi Room");
                   chooseRmType.add("Garage Room");
                   chooseRmType.add("Suite");
                   add(chooseRmType);
                   invalidate();
                   validate();
                   buttSubmitRmQty.removeActionListener(this);
                   ++y;
         public void doRecordArrays()
                   Room[] record = new Room[rmQty];
                   int x, y;
                   for (x=0;x!=rmQty;++x) //this is what i added, because initially i only used y, which i think is the error because it jumps the array, which should have started at zero, while my y variable started at one, so i thought that was the null value that was being passed to my array.BUT i got the same run error messages, so im stuck.
                        for(y=1;y!=rmQty;++y)
         /*null pointer exception*/record[y].setRmRate(rmRate);
                        record[x].setRmNum(y);
                        record[x].setRmType(rmType);
                        record[x].setRmRate(rmRate);
                        //record[x].setcustN
                        //room number, room type, room rate, room occupancy, and cust ID
                        add(new Label("Room No. "+y+" :" +record[y].getRmRate()));
    IN MY ROOM CLASS
    public class Room
         public static String TAXI = "Taxi Room";
         public static String GARAGE = "Garage Room";
         public static String SUITE = "Suite";
         private static int rmN=0, rmR=0, custN=0;
         private String rmT=TAXI;
         boolean rmO=false;
         //room number, room type, room rate, room occupancy, and cust ID
         public Room(int a, String b, int c, boolean d, int cust)
              rmN = a;
              rmT = b;
              rmR = c;
              rmO = d;
              custN = cust;
         public int getRmNum()
              return rmN;
         public String getRmType()
              return rmT;
         public int getRmRate()
              if(rmT.equals(TAXI))
                   rmR = MRoom.taxiRate;
              if(rmT.equals(GARAGE))
                   rmR = MRoom.garageRate;
              if(rmT.equals(SUITE))
                   rmR = MRoom.suiteRate;
              return rmR;
         public boolean getRmO()
              return rmO;
         public int getcustN()
              return custN;
         public void setRmNum(int rn)
              rmN = rn;
         public void setRmType(String rt)
              rmT = rt;
         public void setRmRate(int rr)
              rmR = rr;
         public void setRmO(boolean ro)
              rmO = ro;
         public void setcustN(int cn)
              custN = cn;
    }public class Room
         public static String TAXI = "Taxi Room";
         public static String GARAGE = "Garage Room";
         public static String SUITE = "Suite";
         private static int rmN=0, rmR=0, custN=0;
         private String rmT=TAXI;
         boolean rmO=false;
         //room number, room type, room rate, room occupancy, and cust ID
         public Room(int a, String b, int c, boolean d, int cust)
              rmN = a;
              rmT = b;
              rmR = c;
              rmO = d;
              custN = cust;
         public int getRmNum()
              return rmN;
         public String getRmType()
              return rmT;
         public int getRmRate()
              if(rmT.equals(TAXI))
                   rmR = MRoom.taxiRate;
              if(rmT.equals(GARAGE))
                   rmR = MRoom.garageRate;
              if(rmT.equals(SUITE))
                   rmR = MRoom.suiteRate;
              return rmR;
         public boolean getRmO()
              return rmO;
         public int getcustN()
              return custN;
         public void setRmNum(int rn)
              rmN = rn;
         public void setRmType(String rt)
              rmT = rt;
         public void setRmRate(int rr)
              rmR = rr;
         public void setRmO(boolean ro)
              rmO = ro;
         public void setcustN(int cn)
              custN = cn;
    However...a null object was passed to the
    doRecordArrays, or some null object was called from
    that method...
    The rest is a trace backward based on who called the
    methods..
    (actionPerformed called doRecordArrays, Button called
    actionPerformed, and so on down the line).
    The important line is line 1 &| 2
    ~Dave

  • Run time error while closing the CRM Order using BAPI

    Hi Experts,
    Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue.
    I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep the order in resolved status only. We will not directly close the order from the CRM tool, instead we have created a custom program for the same purpose.
    For the custom program we will give input as the order number and execute it, this will close the order.
    Here close the order means assigning it to Close status as well assign the reason code.
    We have created some reason codes for closed status.
    So when the program is run the Order moves from resolved status to closed status along with reason code.
    But of late we are facing some problems with this program, it is giving run time error for some CRM orders.
    Run time error message : The ABAP/4 Open SQL array insert results in duplicate database records.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught in procedure "CRM_SERVICE_OS_UPD_OST_DU" "(FUNCTION)", nor was it propagated by a RAISING clause.
    Please find my code which have used in the custom program
    Closing the resolved SOs in the system
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
            EXPORTING
              objnr                     = iv_guid
              user_status          = lc_status_closed
           EXCEPTIONS
             object_not_found          = 1
             status_inconsistent       = 2
             status_not_allowed       = 3
             OTHERS                        = 4.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining status'.
        ENDIF.
    Set reason code
    build lt_subject
        ls_subject-ref_guid = iv_guid.
        ls_subject-katalogart = 'A2'.
        ls_subject-codegruppe = 'ZR000003'.
        ls_subject-code       = 'ZR33'.                      " Reason code
        ls_subject-mode       = 'A'.
        APPEND ls_subject TO lt_subject.
    build lt_ossset
        ls_osset-ref_guid        = iv_guid.
        ls_osset-subject_profile = 'ZREASON03'.
        ls_osset-profile_type    = 'G'.
        ls_osset-subject         = lt_subject.
        APPEND ls_osset TO lt_osset.
    build lt_service_os
        ls_service_os-ref_guid  = iv_guid.
        ls_service_os-ref_kind  = 'A'.
        ls_service_os-osset     = lt_osset.
        APPEND ls_service_os TO lt_service_os.
    build lt_input_fields
        REFRESH: lt_input_fields, lt_field_names.
        CLEAR  : ls_input_fields, ls_field_names.
        ls_field_names-fieldname    = 'CODE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'CODEGRUPPE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'KATALOGART'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'SERVICE_PROFILE'.
        APPEND ls_field_names TO lt_field_names.
        ls_input_fields-ref_guid    = iv_guid.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'SERVICE_OS'.
        ls_input_fields-field_names = lt_field_names.
        APPEND ls_input_fields TO lt_input_fields.
         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            it_service_os     = lt_service_os
          CHANGING
            ct_input_fields   = lt_input_fields
          EXCEPTIONS
            error_occurred    = 1
            document_locked   = 2
            no_change_allowed = 3
            no_authority      = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining reason'.
        ENDIF.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save   = lt_header_guid
            iv_update_task_local = lv_update_task_local
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            document_not_saved   = 1
            OTHERS               = 2.
        IF sy-subrc <> 0.
          WRITE : 'Error at saving'.
        ELSE.
          WRITE : 'Successfully Closed'.
          COMMIT WORK AND WAIT.
        ENDIF.
    Run time error is coming at COMMIT WORK AND WAIT statement.
    Please let me know any corrections are required in the above program.
    When I analyzed the run time error I have found that it trying to insert the record in CRMD_SRV_OSSET for that CRM order, but already one record is present in the table for the same CRM order number.
    For most of the CRM orders there is no entry in this table so they are closing successfully but for a few orders for which there is an entry we are getting the above run time error.
    There is nothing wrong with the orders which have an entry already in the table CRMD_SRV_OSSET, I need to close these kind of orders with out run time error.
    Kindly provide your feedback.

    Hi Dinakar,
    You posted this in APO PPDS forum. This question should go to PP forum where someone could answer it.
    Please close this thread and open a new thread in PP forum so that you could get help quickly from the relevant experts.
    Regards - Pawan

  • Error while unloading data from teradata to a flatfile

    while executing the interface that writes data into a flat file from a table, the interface fails with the error message
    "Bytes are too big for array"
    any idea ?

    Hi ,
    Try to simulate the process.That can give you exact error location.
    It seems like while updating few records may be no in the format of the field in which it is updated.
    Regards
    Rahul Bindroo

  • SAPSQL_ARRAY_INSERT_DUPREC Runtime error

    I am getting following error what could be the error please suggest me.
    Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC
    Exception              CX_SY_OPEN_SQL_DB
    Date and Time          18.08.2010 20:39:30
    Short text
    The ABAP/4 Open SQL array insert results in duplicate database records.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "/SAPAPO/SAPLDM_MATERIAL" had to be terminated because
    it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "/SAPAPO/DM_PRODUCTS_POST" "(FUNCTION)", nor was it propagated by a
    RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    How to correct the error
    Use an ABAP/4 Open SQL array insert only if you are sure that none of
    the records passed already exists in the database.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB"
    "/SAPAPO/SAPLDM_MATERIAL" or "/SAPAPO/LDM_MATERIALU46"
    "/SAPAPO/DM_PRODUCTS_POST"
    |

    Dear
    this dump can have several reasons.
    If you are on SCM7.0 and you have implemented the BADI solution of note 918542 , this can be the rootcause of the problem. The solution is covered in the standard on SCM7.0 and not neccessary anymore for this SCM release.
    Due to the BADI, the system tries to create the products twice (in BADI and in standard) which leads to the SQL error. If this is you case could you please deimplement the BADI solution? You can process the queue afterwards which should go through without any error.               
    The problem can also happen due to a user exit e.g. EXIT_SAPLCMAT_001.                                          
    Regards,
    Tibor

  • Error while uploading SSL certificate in Visual Admin

    Hi,
    I generated a .cert base 64 certificate from STRUST tcode of my ECC server.I'am tring to load the certificate in visual administrator under key storage --> ADS Certs. while loading,  it is giving me an error message stating " Key Store : ID21113:Input array size must be multiple by 4."
    I was able to upload the same certificate with .cert extension previously, but this time it is throwing me import failed error and the above error message. I checked in forums but i  couldn't find any solution.
    Please guide me with a solution.
    With Regards,
    Joel

    work around provided by SAP
    I neither managed to load your key to my keystorage.
    Nevertheless, I converted your certificate by means of the
    "Certificate Export Wizard" (of the Internet Explorer) to "DER encoded
    binary X.509 (.cer). Then I renamed the file to "ORDclstd.crt" and
    finally was able to load this certificate to the keystorage.

  • In SOLUTION MANAGER, the thresholds for log attrib are not taken in account

    I’m using a SAP SOLUTION MANAGER to monitor any satellites systems.
    In this case, I have a problem with the monitoring of BDoc messages for a satellite.
    I’m declaring some threshold for BDocs in error status and anothers thresholds for BDocs in waiting for response in SOLMAN.
    Unfortunately, the thresholds are not taken in account.
    Here, you should find the threshold in the setup monitoring:
          green to yellow: 10
          yellow to green:   11
          red to yellow:       9
          yellow to green:   8
    When I have only 2 errors in the satellite system and 1 entrie in Waiting status ,I have 2 red alerts in SOLMAN. It is not correct because my thresholds in SOLMAN are greater than this values.
    unfortunately thresholds are only considered for performance attributes
    (see legend in the monitoring setup). For all other MTE types in CCMS
    the tresholds are not considered. The BDoc MTEs that I have used
    in my example is a log attribute.
    Please, someone could you help me to solve this problem or indicate me how to correct this problem with another tips?
    best regards
    cesario

    Sorry, but what you say is not a good idea, since it would mean changing a standard object. But what I posted is ok, using a redefinition of the method GET_DQUERY_VALUEHELPS works perfectly well for the need.
    Regards,
    Xavier

Maybe you are looking for