Triggering write commands

Hi,
I currently have a load cell that I have interfaced with a RS232 port. The load cell is sending string data which I am collecting using the I/O Instrument Assist manager in LabView. I am collecting that data, converting to dynamic type and writing to a LabView meaurement file. I have this setup in a while loop to keep collecting data. I am also writing string data via another RS232 port to a stepper motor driver. I am currently just doing testing of the driver/motor using the LabView example code Basic_read_and_write.vi. What I basically wish to do is that when the load cell reading reaches a target value, I send a diferrent string to the stepper motor driver. The initial write string to the drive cell is "M+", which makes the motor move forward at constant velocity. The motor will apply a force on the load cell. When this force reaches a target value, I want the write string to the driver to change to "M-", which moves the stepper motor backwards at constant velocity.
I was thinking of using the case structure function and having the "true" case as the move forwatd string and the "false" case as the move backward string. I was then going to use the function in the string palette that outputs a boolean "true" or "false" depending on the value of the input string, where the "true" or "false" output is wired to the case structure.
Does anyone have some better suggestions than what I have thought of? This seams a bit convuluted. Can someone see a modification of the 2 port read/write example. Any help would be really appreciated.
Cheers,
Dave

Hello Dave,
This sounds like the exact programming logic you should be using. Case structures are the perfect tool for decision making for a continuous process. You basically want to execute different code (write commands) based upon input values from earlier code (read commands). This is exactly what case structures are used for.
Thank you and good luck,
Michael Chaney
Systems Engineer - TestStand
National Instruments

Similar Messages

  • Serial Write - 8Mb file to write. Write command can only do 256 Bytes at a time. How to split up?

    First, thanks for this resource. I've used this forum quite a bit as a "lurker" and it's gotten me this far. Hoping to learn a bit, so I can contribute
    Anyway, my issue is this:
    I am ultimately trying to write an 8Mb binary file to an 8Mb Serial Flash device via the Total Phase Aardvark. The writes to the flash device I am using are limited to 256 bytes per write command. The vi program attached is capable of writing 256 bytes at a time, but not anything more. I realize I need to incorporate some sort of "For Loop" (and I understand that I'd want to do it =(File Size)/256 interations, but I can't seem to figure out how.
    Does anyone have any quick advice to drive me in the right direction?
    Thank you!
    Attachments:
    Aardvark bin test 02.vi ‏33 KB

    Well, you seem to have answered your own question, so it's not clear what your specific issue is. Is it how to extract 256 bytes at a time?
    As for the code... umm... I'm not entirely sure what you're trying to accomplish with the whole top half of your code, but it seems to me that almost the whole thing can be replaced by a single call to the Read Binary File function. What is the format of these binary files?

  • BPM process archiving "Processing of archiving write command failed"

    Can someone help me with the following problem. After archiving a BPM proces, I get the following messages (summary):
    ERROR  Processing of archiving write command failed
    ERROR  Job "d5e2a9d9ea8111e081260000124596b3" could not be run as user"E61006".
    LOG -> Processing of archiving write command failed
    [EXCEPTION] com.sap.glx.arch.xml.XmlArchException: Cannot create archivable items from object
    Caused by: java.lang.ClassCastException: ...
    Configuration
    I've completed the following steps based on a blog item.
    1. created an archive user with the corresponding roles
    2. updated the destination DASdefault with the created user -> destination ping = OK
    3. created an archive store BPM_ARCH based on unix root folder
    4. created home path synchornization with home path /<sisid>/bpm_proc/ and archive store BPM_ARCH
    5. start process archiving from manage processes view.
    Process Archiving
    Manage Process -> Select a process from the table -> Archive button -> Start archiving by using the default settings.
    Archiving Monitor
    The following log is created which describe that the write command failed.
    Write phase log:
    [2011.09.29 12:00:18 CEST] INFO   Job bpm_proc_write (ID: d5e2a9d9ea8111e081260000124596b3, JMS ID: ID:124596B30000009D-000000000C08) started on Thu, 29 Sep 2011 12:00:18:133 CEST by scheduler: 5e11a5e0df3111decc2d00237d240438
    [2011.09.29 12:00:18 CEST] INFO   Start execution of job named: bpm_proc_write
    [2011.09.29 12:00:18 CEST] INFO   Job status: RUNNING
    [2011.09.29 12:00:18 CEST] ERROR  Processing of archiving write command failed
    [2011.09.29 12:00:18 CEST] INFO   Start processing of archiving write command ...
    Verify Indexes ...
    Archive XML schema ...
    Resident Policy for object selection is  instanceIds = [9ca38cb2343511e0849600269e82721e] ,  timePeriod = 1317290418551 ,  inError = false ,
    [2011.09.29 12:00:18 CEST] ERROR  Job "d5e2a9d9ea8111e081260000124596b3" could not be run as user"E61006".
    [2011.09.29 12:00:18 CEST] INFO   Job bpm_proc_write (ID: d5e2a9d9ea8111e081260000124596b3, JMS ID: ID:124596B30000009D-000000000C08) ended on Thu, 29 Sep 2011 12:00:18:984 CEST
    Log viewer
    The following message is created in the log viewer.
    Processing of archiving write command failed
    [EXCEPTION]
    com.sap.glx.arch.xml.XmlArchException: Cannot create archivable items from object
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.lang.ClassCastException: class com.sap.glx.arch.Archivable:sap.com/tcbpemarchear @[email protected]2@alive incompatible with interface com.sap.glx.util.id.UID:library:tcbpembaselib @[email protected]f@alive
    at com.sap.glx.arch.him.xml.JaxbTaskExtension.createJaxbObjects(JaxbTaskExtension.java:69)
    at com.sap.glx.arch.xml.JaxbSession.fillFromExtensions(JaxbSession.java:73)
    at com.sap.glx.arch.pm.xml.ArchProcessExtension.fillHimObjects(ArchProcessExtension.java:113)
    at com.sap.glx.arch.pm.xml.ArchProcessExtension.createArchObjectItem(ArchProcessExtension.java:60)
    at com.sap.glx.arch.xml.JaxbSession.createArchObjectItems(JaxbSession.java:39)
    at com.sap.glx.arch.xml.Marshaller.createItems(Marshaller.java:29)
    ... 61 more

    Hi Martin,
    I don't have a specific answer sorry, however I do recall seeing a number of OSS notes around BPM archiving whilst searching for a different issue last year - have you checked on there for anything relevant to your currnet version and SP level?  There were quite a few notes if memory serves me well!
    Regards,
    Gareth.

  • Write command could not be executed

    Hello,
    I'm back again with a new error that I can't seem to figure
    out. Any help would be greatly appreciated.
    Error Occurred While Processing Request
    Error: WRITE command could not be executed
    write
    E:\Websites\thriftypockets\wwwroot\coupon\photos\generated\105436.gif
    The error occurred in
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 293
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 290
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 34
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 1
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon_preview.cfm:
    line 26
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon.cfm:
    line 767
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon.cfm:
    line 1
    291 : <cfx_image action="IML"
    292 : file="NEW"
    293 : x="590"
    294 : y="239"
    295 : commands="
    Thanks in advance

    There are guesses, but I would check:
    1. Does the target directory exist?
    2. Does the CF application server account does not have
    rights to access directory?

  • Write Command in Shell

    Is there a write command in shell? It seems like there should be, but I guess most people just use the ">" and "<" symbol. It just seems like it would make things simpler to just use the "|" pipe symbol.

    I can verify it was on Minix 1 (1980's). Here is the man page (very short!):
    Command: tee - divert standard input to a file
    Syntax: tee [-ai] file ...
    Flags: -a append to the files, rather than overwriting
    -i ignore interrupts
    Examples: cat file1 file2 | tee x # Save and display two files
    pr file | tee x | lpr # Save the output of pr on x
    Tee copies standard input to standard output. It also makes copies on
    all the files listed as arguments.
    Edit: It looks like it is an old UNIX command. You can find its manual entry for Version 7 UNIX under volume 1, section 2 here or here.
    Last edited by fsckd (2009-10-24 13:10:44)

  • Call x.exe and write command in opened DOS window

    Hi,
    I am using Labview 10 and Window 7. Just wondering how to use labview to
    1. run x.exe under opened DOS window?
    2. write command in opened DOS window?
    Any commends welcome,
    Thanks,
    Ott

    Please take a look here
    Alejandro | Academic Program Engineer | National Instruments

  • WRITE command gives unexpected value when currency is JPY (japanse yen)

    Hi All
    I am getting unexpected value for below WRITE command but only when the currency is JPY (Japan Yen)
    lv_amount = 1215.40
    lv_currency = u2018JPYu2019.
    write   lv_amount   to   ev_amount_ext    left-justified    no-gap   NO-GROUPING   currency lv_currency.
    Value wrongly gets as ev_amount_ext = 121540 (Decimal takes as full value)
    Appreciate your help if you have any idea on this please
    Many Thanks
    Iver

    Hi,
      use like this
      lv_amount = '1215.40'
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.
    other wise.
    data lv_amounts  type string.
    move lv_amount to lv_amounts.
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.

  • Error message after write command

    Hi,
    i have a program that will display an error message after a write command...
    it goes like this: when you click on the button change material it will go to the transaction MM02 and when you saved your changes the value of the table will refresh but when it was refresh and there is no data that would retrieve an error message will pop-up no data selected..but when you click on the check button or enter the previous data still appears which is wrong it should go back to the selection screen...
    can anybody can help me with this?
    thank you...
    regards,
    mae

    hi,
    i am currently in the output table with a valid data and when i change the procurement type from E to F at the button change material(transaction MM02) it should display an error message after saving the changes and then go bak to the selection screen not on the previouse output table...
    how will i do it?
    thank you

  • Write command

    how i can use write in
    event AT SELECTION-SCREEN.

    Hi,
    We can not use the WRITE command in this Event
    The event AT SELECTION-SCREEN is the basic form of a whole series of events that occur while the selection screen is being processed.
    The standard selection screen in an executable program or in the logical database linked to it is automatically called between the INITIALIZATION and START-OF-SELECTION events. When you call the selection screen, and when users interact with it, the ABAP runtime environment generates selection screen events, which occur between INITIALIZATION and START-OF-SELECTION.
    You can define event blocks for these events in your program to change the selection screen or process user input.
    You can use the COMMENT to write the text in the selection screen ..
    To place comments on the selection screen, you use:
    SELECTION-SCREEN COMMENT [/]pos(len) comm [FOR FIELD f]
                                              [MODIF ID key].
    This statement writes the comm comment on the selection screen. For comm, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length len. The field must be filled before the selection screen is called. You must always specify the pos(len) addition. Only if there are several elements in one line can you omit pos.
    The text comm  will be displayed, starting in column pos, for a length of len. If you do not use a slash (/), the comment is written into the current line; otherwise a new line is created.
    You use FOR FIELD f to assign a field label to the comment. f can be the name of a parameter or a selection criterion. As a result, if the user requests help on the comment on the selection screen, the help text for the assigned field f is displayed.
    The MODIF ID keyaddition has the same function as for the PARAMETERS statement. You can use it to modify the comment before the selection screen is called.
    Here is the exampel Program
    REPORT demo_sel_screen_select_comment.
    SELECTION-SCREEN COMMENT /2(50) text-001 MODIF ID sc1.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN COMMENT /10(30) comm1.
    SELECTION-SCREEN ULINE.
    PARAMETERS: r1 RADIOBUTTON GROUP rad1,
                r2 RADIOBUTTON GROUP rad1,
                r3 RADIOBUTTON GROUP rad1.
    SELECTION-SCREEN ULINE /1(50).
    SELECTION-SCREEN COMMENT /10(30) comm2.
    SELECTION-SCREEN ULINE.
    PARAMETERS: s1 RADIOBUTTON GROUP rad2,
                s2 RADIOBUTTON GROUP rad2,
                s3 RADIOBUTTON GROUP rad2.
    SELECTION-SCREEN ULINE /1(50).
    INITIALIZATION.
    COMM1 ='Radio Button Group 1'.
    COMM2 ='Radio Button Group 2'.
      LOOP AT SCREEN.
        IF screen-group1 = 'SC1'.
          screen-intensified = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Regards
    Sudheer

  • How to write commands to Crossbow MDA300 with LabVIEW?

    I am able to read data from Nodes using LabVIEW, but I would like to write commands to the nodes using LabVIEW. How can I do that? I am using Iris mote, MDA300, MTS420, MTA 310 sensor boards and MIB520 USB board gateway board  and I had got LabVIEW drivers when I purchased the kit. Kindly help.
    Attachments:
    Crossbow WSN .docx ‏319 KB

    Hello,
              I am also using the same components which you have used. but i don't have drivers for it. can you please tell me from where i can get them.

  • CMTS Issue when is write command entered

    Hi All ,
    I found strange issue with IOS SCG6 i get this errors . Standby crash when is done write on CMTS ubr10k.
    Apr 11 13:52:43: %UBR10000-3-PROXY_OR_SPOOF_ARPREPLY: Interface Cable5/1/2, ARP reply is a proxyed ARP reply or spoofed attempt. IP=x.x.x.x, MAC=000e.2eeb.aa7f,
    SID 375; Found x.x.x.x 001d.924d.f3e2 0x13 SID 227 in code 2
    Apr 11 13:52:44: Config Sync: Line-by-Line sync verifying failure on command:
       upstream Cable6/1/2 4-5
    due to parser return error
    Apr 11 13:52:45: %UBR10000-3-PROXY_OR_SPOOF_ARPREPLY: Interface Cable5/1/2, ARP reply is a proxyed ARP reply or spoofed attempt. IP=x.x.x.x., MAC=000e.2eeb.aa7f,
    SID 375; Found x.x.x.x 001d.924d.f3e2 0x13 SID 227 in code 2
    Apr 11 13:52:47: %UBR10000-3-PROXY_OR_SPOOF_ARPREPLY: Interface Cable5/1/2, ARP reply is a proxyed ARP reply or spoofed attempt. IP=x.x.x.x.x, MAC=000e.2eeb.aa7f,
    SID 375; Found x.x.x.x 001d.924d.f3e2 0x13 SID 227 in code 2
    SLOT 7/1: Apr 11 13:52:47: %UBR10000-5-USMODCHANGE: Interface Cable7/1/0 U7, dynamic modulation changed to 16-QAM
    Apr 11 13:52:51: %RF-5-RF_RELOAD: Peer reload. Reason: Configuration mismatch
    Apr 11 13:52:51: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_NOT_PRESENT)
    Apr 11 13:52:51: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_DOWN)
    Apr 11 13:52:51: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_REDUNDANCY_STATE_CHANGE)
    Apr 11 13:52:51: %C10KEHSA-1-STANDBY_RESET: Subsystem 'Config-Sync' has reset the Standby PRE. Reason='Configuration mismatch'
    Apr 11 13:52:51: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_NOT_PRESENT)
    Apr 11 13:52:51: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_DOWN)
    Apr 11 13:52:52: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_NOT_PRESENT)
    Apr 11 13:52:52: %REDUNDANCY-3-STANDBY_LOST: Standby processor fault (PEER_DOWN)
    Apr 11 13:52:52: %RED-5-REDCHANGE: PRE A now not present(0x1C11 => 0x1031)
    Apr 11 13:52:52: %REDUNDANCY-5-PEER_MONITOR_EVENT: Active detected a standby insertion (raw-event=PEER_FOUND(4))
    Apr 11 13:52:52: %RED-5-REDCHANGE: PRE A now Non-participant(0x1031 => 0x1421)
    Apr 11 13:52:52: %REDUNDANCY-5-PEER_MONITOR_EVENT: Active detected a standby insertion (raw-event=PEER_REDUNDANCY_STATE_CHANGE(5))
    Any colclusion ?
    KR
    VZ

    Hi,
      use like this
      lv_amount = '1215.40'
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.
    other wise.
    data lv_amounts  type string.
    move lv_amount to lv_amounts.
    lv_currency = u2018JPYu2019.
    write lv_amount to ev_amount_ext left-justified no-gap NO-GROUPING currency lv_currency.

  • Help me write command in vba(excel) to search and find special cells based on multiple criteria

    Hi 
    My name is Majid Javnmard , I am using Microsoft Office Excel 2010 and I encountered a problem. I sent you a simple example of my excel file that i want to write a command in vba to search and find special cell and copy the row which special cell is in there
    somewhere , but the problem is how can i find my special cell with multiple criteria or how can i find my all special cells and copy them somewhere !!? 
    Let me explain on file that i sent :
    This file has 4 headers (X,Y,PerturbNumber,Value), the problem is for example : I want write commnd in vba to copy all rows that each of them has (X=12 and Y=13). how can i ? can you help me ?
    My
    file : http://s000.tinyupload.com/index.php?file_id=69742844961096241754
    Many Thanks
    Majid 

    This worked for me, based on your example:
    Sub pMain()
    Dim wsSource As Excel.Worksheet
    Dim wsDest As Excel.Worksheet
    Dim lSource As Long
    Dim lDest As Long
    Dim lLast As Long
    With ThisWorkbook
    'Change to suit
    Set wsSource = .Worksheets("Sheet1")
    Set wsDest = .Worksheets.Add
    End With
    wsSource.Rows(1).Copy
    wsDest.Range("A1").PasteSpecial xlPasteValues
    lDest = 2
    lLast = wsSource.Cells(wsSource.Rows.Count, "A").End(xlUp).Row
    For lSource = 1 To lLast
    'Put the conditions below:
    If wsSource.Cells(lSource, "A") <> 12 Then GoTo linNext
    If wsSource.Cells(lSource, "B") <> 30 Then GoTo linNext
    'If wsSource.Cells(lSource, "C") <> "value" Then GoTo linNext
    'If wsSource.Cells(lSource, "D") <> "value" Then GoTo linNext
    'Conditions were met:
    wsSource.Rows(lSource).Copy
    wsDest.Rows(lDest).PasteSpecial xlPasteValues
    lDest = lDest + 1
    linNext:
    Next lSource
    End Sub
    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

  • Report Writer Commands

    We are trying to create a fixed length export file from the report writer in the Essbase Application Manger with version 6.2. My challange is that I need the fixed length fields padded with zeros. Has anyone been able to accomplish this ? Any help would be greatly appreciated. Thanks.

    I am trying to execute this first on cansole and later will conver it into Servlet.
    Thanks
    Amol

  • I am looking for what type/setup of Read/Write command in RSLogix 5000 to be used with the NI Ethernet I/P Driver

    I am working on trying to get LabView to communicate with an Allen-Bradley Compact Logix PLC using the NI Ethernet I/P driver.  I am currently getting errors on both system of a CIP Message instruction error and cannot determine if the problem is in the PLC or the NI.  At this time we are leaning toward the PLC, thus I was wondering if anyone new what type/setup of message read and write to utilize.

    Hello jabcae,
    Thank you very much for posting your questions.
    I recommend posting to the PLC Manufacture’s forums.  They will be able to provide more insight on the PLC code.
    I also recommend posting this question to the Industrial Communications forum:
    http://forums.ni.com/t5/Industrial-Communications/bd-p/260
    That forum is monitored by the developer’s of the EtherNet I/P Toolkit. They will be able to assist with the LabVIEW programming.
    Regards,
    Thomas C.
    Applications Engineer
    National Instruments

  • Essbase Report writer Command

    How do i turn on Heading for Row dimensions like Account, Unit and Product.

    There is no command to turn on row headings. This has bothered people for as long as I know. The way I got around it was to create a file with a single row that had all readers. I turn off headers in the report script and concatinate the one row file with the output from the report script using a batch command after it runs

Maybe you are looking for

  • Error -1309 large file transfers under Mac OS extended format

    When transferring large video files from one firewire drive to another in OSX panther on Rocstor firewire media formatted in Mac OS extended, I am getting error -1309 and lots of problems. The new 250 gig even became unreadable, data was lost, and I

  • I cant connect the macbook pro to our internal network

    previously the MBP used to log in no problem. Hard disk went, Apple installed new hard disk, we installed OS Lion and now it will not connect to a windows based server, what can be done

  • UWL iView in Sharepoint: Popup shows TLN

    We are displaying the Unviversal Worklist (UWL) iView in Sharepoint. Whenever an item therein is clicked, the resulting Popup displays the DTN (Detailed Navigation) and TLN (Top-level Navigation) in the Popup and displays the content in the Content A

  • Reg dynamic instance

    hi guys, what ever you guys told is correct but in the create object the instance name of which type. CREATE OBJECT L_INST_ASY_CALL TYPE (LV_CONTROL). data: L_INST_ASY_CALL type <?>. reg, hari

  • How to recover messages deleted by sender on samsu...

    Please help! Appreciate it a lot!