Send serial command in VBAI based off of calculation

I am attempting to send serial commands through VBAI based off of a previous calculation step. For instance, my application will determine an objects mass center and then determine if it is to the left or right of my origin. From here, I would like to be able to send a serial command based on the left/right result. The command will be sent to an arduino which will controll a servo left or right based on the command it recieves. I think I have everything but linking to serial command to the calculation result figured out here. Any feedback or help with this would be greatly appreciated.

In the Serial step, when you are sending a command (i.e. you press the "Send Command" button), you can press the "Insert Result" button to have the serial command you send out conatin a result from a previous step. There are even formatting options so you can have numeric previous measurements formatting into the string as you want. If you need to send results from other states, you can use variables to pass data between states since the Serial step doesn't currently support accessing results from other states.
Hope this helps,
Brad

Similar Messages

  • RS232 Serial commands for Cisco 32" LCDs

    Are the serial commands for power on/off for the Cisco 32" LCDs different than the 40" and 52" monitors?
    The "rs232.tx_hex=aa11fe010111" for power on and "rs232.tx_hex=aa11fe010010" work fine on the 40"s but the 32"s do not respond to these same commands.
    I know the 40" and 52" LCDs are Samsung. The 32"s appear to be LG so I would suspect the serial commands would be different as well.
    I have been unable to find any documentation for the 32"s.
    Thanks in advance

    Doug,
    Have you tried using the Control TV icon in the DMP Manager?
    You can power on and off the Cisco 30" from here along with
    other rs232 control commands.
    You also could use wireshark to sniff the wire to
    see what codes the DMM are sending the DMP.
    Cisco 32"\LG - RS232.Control
    To use the RS232 commands on the DMP the serial port must be set to ON and
    be pointed at the /dev/ttyS1 device.
    To check this create a System Task to check your settings using Task 5
    below. If your serial port is anything other than /dev/ttyS1 use Task 1
    to set it correctly.
    TASKS
    =====
    1. Create a system task under application
    use type "set"
    name it "RS232 ON"
    init.startService_rs232=yes&rs232.device=/dev/ttyS1&mib.save=1&mng.reboot=1
    2. Create system task "RS232 OFF"
    use type "set"
    init.startService_rs232=no&rs232.device=/dev/ttyS1&mib.save=1&mng.reboot=1
    3. Create system task "Cisco 32N LCD ON"
    use type "set"
    rs232.tx_hex=6B612030312030310D
    4. Create system task "Cisco 32N LCD OFF"
    use type "set"
    rs232.tx_hex=6B612030312030300D
    5. Check DMP RS232 Settings (This setting will allow you to check the RS232
    settings)
    use type "get"
    p=rs232.*
    If this answers your question, Please take time to mark this
    discussion answered & rate the response.
    Thank You!
    T.

  • Using VI Example Basic Serial Write Read to send AT commands to Cell phone modem error 1073807360

    I am using the NI Example VI: Basic Serial Write and Read to send AT commands to a Cell phone acting as a Modem.  I can send AT commands to this phone using Hyperterm when I select the modem driver by name in the hypert port selection field but not as com 7 which it occupies according to device manager modem properties. The basic serial vi does not show the modem driver as a selection, only ports by comX are shown. I get error 1073807360.

    Have you tried to put the name you enter in Hyperterminal in the VISA resource control? If Com 7 doesn't show, you can simply type "COM 7" in the VISA resource control. Or use "ASRL::INSTR 7".
    Also, make sure the connection in hyperterminal is closed, before you open the port in LabVIEW.
    Hope it helps,
    Wiebe.

  • Can't Set Remote Login OFF via Send Unix Command systemsetup

    Trying to use the System Setup->Remote Login template in ARD to turn off Remote Login (SSH) in Sharing panel of System Preferences on Mac that is administered through Apple Remote Desktop.
    In Apple Remote Desktop (ARD), I select the client machine, then choose "Send Unix Command..." from the "Manage" menu. In resultant window, I pick "System Setup->Remote Login (SSH) from the "Template" drop down box in the upper right. That populates the upper window with Unix commands. I edit/change the "on" to "off" and tell the dialog to Run command as User: root, then click on "Send" button.
    Progress bar goes forever with no change.
    I can turn off Remote Login via ARD by controlling each client machine via an ARD WINDOW, then navigating to the Sharing Preference pane, but that process is tedious when performing for multiple client Macs.
    Strange, but I CAN use the "Send Unix Command..." outlined above to turn ON Remote Login, and get the status of Remote Login ("systemsetup -getremotelogin"). Just can't turn OFF Remote Login (quickly/efficiently).
    man systemsetup suggests I need to write the command as "setremotelogin -f off" but that failed with an improper command syntax error.
    Thoughts?

    It’s waiting for you to type a confirmation. If you run this command on the command line normally, you’ll see the message:
    Do you really want to turn remote login off? If you do, you will lose this connection and can only turn it back on locally at the server (yes/no)?
    Use this command instead:
    systemsetup -f -setremotelogin off

  • How do I monitor serial port activity without first sending a command?

    In my application I am sending a command through the serial interface and I want to monitor the response. The response is not instant, in fact it is a timeout response indicating the requested action did not work. How do I monitor so I can parse what is coming in over the serial port without necessarily sending a command?

    You can always place a loop where you monitor the number of bytes at the serial port.
    After configuring your VISA serial port session, you can create a Property Node to get the number of bytes available at serial port.
    You can then process this information, for instance:
    1. Establish a timeout because you never get a response.
    2. Do serial port read if there is data available.
    You can exit the loop with a timeout condition or having processed the data.
    -JLV-

  • TCP connection error when sending MODBUS commands to WAGO 750-881 controller after 113655 bytes of data have been sent

    Hi all,
    I am new to the world of labview and am attempting to build a VI which sends commands to a 750-881 WAGO controller at periodic intervals of 10ms. 
    To set each of the DO's of the WAGO at once I therefore attempt to send the Modbus fc15 command every 10ms using the standard Labview TCP write module. 
    When I run the VI it works for about a minute before I recieve an Error 56 message telling me the TCP connection has timed out. Thinking this strange, I decided to record the number of bytes sent via the TCP connection whilst running the program. In doing so I noticed that the connection broke after exactly 113655 Bytes of data had been sent each time. 
    Thinking that I may have been sending too many messages I increased the While-loop delay from 10ms to 20, 100 and 200 ms but the error remained. I also tried playing with the TCP connection timeout and the TCP write timeout but neither of these had any effect on the problem. 
    I cannot see why this error is occuring, as the program works perfectly up untill the 113655 Bytes mark. 
    I have attached a screenshot of the basic VI (simply showing a MODBUS command being sent every second) and of a more advanced VI (where I am able to control each DO of the WAGO manually by setting a frequency at which the DO should switch between ON and OFF). 
    If anybody has any ideas on where the problems lie, or what I could do to further debug the program this would be greatly appreciated. 
    Solved!
    Go to Solution.
    Attachments:
    Basic_VI.png ‏84 KB
    Expanded_VI.png ‏89 KB

    AvdLinden wrote:
    Hi ThiCop,
    Yes the error occurs after exactly 113655 bytes every time. The timeout control I would like to use is 10ms, however even increasing this to 1s or 10s does not remove the error, which leads me to believe that this is not the issue (furthermore, not adding any delay to the while loop, thus letting it run at maximum speed, has shown that the TCP connection is able to send all 113655 bytes in under 3 seconds again pointing towards the timeout control not being the issue here). 
    I attempted Marco's suggestion but an having difficulty translating the string returned into a readable string, (rightnow the response given is "      -#   +   ").
    As to your second suggestion, I implemented something similar where I created a sub VI to build a TCP connection, send a message and then close the connection. I now build each message and then send the string to this subVI which successfully sends the command to my application. Whilst not being the most elegant method of solving the issue, it has resolved the timeout problem meaning I am able to send as many commands as I want. So in that sense the problem has been solved. 
    If you still have tips on how to correctly read the TCP read output, I would however like to see if I could not get my first program to work as it is slightly more robust in terms of timing. 
    Modbus TCP RTU is a binary protocol, as you show in your Basic VI, where you format the data stream using byte values. So you have to interprete the returned answer accordingly with the Modbus RTU spec in hand. Now what is most likely happening is that the connection gets hung after a while since you do NOT read the data the device sends as response to your commands. The TCP/IP stack buffers those bytes and at some point the internal buffers overflow and the connection is blocked by the stack. So adding the TCP Read at strategic places (usually after each write) is the proper solution for this. Is there any reason that you didn't use the NI provided Modbus TCP library?
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • PS Script to Automate NIC Teaming and Configure Static IP Address based off an Existing Physical NIC

    # Retrieve IP Address and Default Gateway from static IP Assigned NIC and assign to variables.
    $wmi = Get-WmiObject Win32_NetworkAdapterConfiguration -Filter "IPEnabled = True" |
    Where-Object { $_.IPAddress -match '192\.' }
    $IPAddress = $wmi.IpAddress[0]
    $DefaultGateway = $wmi.DefaultIPGateway[0]
    # Create Lbfo TEAM1, by binding “Ethernet” and “Ethernet 2” NICs.
    New-NetLbfoTeam -Name TEAM1 -TeamMembers "Ethernet","Ethernet 2" -TeamingMode Lacp -LoadBalancingAlgorithm TransportPorts -Confirm:$false
    # 20 second pause to allow TEAM1 to form and come online.
    Start-Sleep -s 20
    # Configure static IP Address, Subnet, Default Gateway, DNS Server IPs to newly formed TEAM1 interface.
    New-NetIPAddress –InterfaceAlias “TEAM1” –IPAddress $IPAddress –PrefixLength 24 -DefaultGateway $DefaultGateway
    Set-DnsClientServerAddress -InterfaceAlias “TEAM1” -ServerAddresses xx.xx.xx.xx, xx.xx.xx.xx
    Howdy All!
    I was recently presented with the challenge of automating the creation and configuration of a NIC Team on Server 2012 and Server 2012 R2.
    Condition:
    New Team will use static IP Address of an existing NIC (one of two physical NICs to be used in the Team).  Each server has more than one NIC.
    Our environment is pretty static, in the sense that all our servers use the same subnet mask and DNS server IP Addresses, so I really only had
    to worry about the Static IP Address and the Default Gateway.
    1. Retrieve NIC IP Address and Default Gateway:
    I needed a way to query only the NIC with the correct IP Address settings and create required variables based on that query.  For that, I
    leveraged WMI.  For example purposes, let's say the servers in your environment start with 192. and you know the source physical NIC with desired network configurations follows this scheme.  This will retrieve only the network configuration information
    for the NIC that has the IP Address that starts with "192."  Feel free to replace 192 with whatever octet you use.  you can expand the criteria by filling out additional octects... example:
    Where-Object
    $_.IPAddress
    -match'192\.168.' } This would search for NICs with IP Addresses 192.168.xx.xx.
    $wmi
    = Get-WmiObject
    Win32_NetworkAdapterConfiguration
    -Filter "IPEnabled = True"
    |
    Where-Object {
    $_.IPAddress
    -match '192\.' }
    $IPAddress
    = $wmi.IpAddress[0]
    $DefaultGateway
    = $wmi.DefaultIPGateway[0]
    2. Create Lbfo TEAM1
    This is a straight forward command based off of New-NetLbfoTeam.  I used  "-Confirm:$false" to suppress prompts. 
    Our NICs are named “Ethernet” and “Ethernet 2” by default, so I was able to keep –TeamMembers as a static entry. 
    Also added start-sleep command to give the new Team time to build and come online before moving on to network configurations. 
    New-NetLbfoTeam
    -Name TEAM1
    -TeamMembers "Ethernet","Ethernet 2"
    -TeamingMode SwitchIndependent
    -LoadBalancingAlgorithm
    Dynamic -Confirm:$false
    # 20 second pause to allow TEAM1 to form and come online.
    Start-Sleep
    -s 20
    3. Configure network settings for interface "TEAM1".
    Now it's time to pipe the previous physical NICs configurations to the newly built team.  Here is where I will leverage
    the variables I created earlier.
    There are two separate commands used to fully configure network settings,
    New-NetIPAddress : Here is where you assign the IP Address, Subnet Mask, and Default Gateway.
    Set-DnsClientServerAddress: Here is where you assign any DNS Servers.  In my case, I have 2, just replace x's with your
    desired DNS IP Addresses.
    New-NetIPAddress
    –InterfaceAlias “TEAM1”
    –IPAddress $IPAddress
    –PrefixLength 24
    -DefaultGateway $DefaultGateway
    Set-DnsClientServerAddress
    -InterfaceAlias “TEAM1”
    -ServerAddresses xx.xx.xx.xx, xx.xx.xx.xx
    Hope this helps and cheers!

    I've done this before, and because of that I've run into something you may find valuable. 
    Namely two challenges:
    There are "n" number of adapters in the server.
    Adapters with multiple ports should be labeled in order.
    MS only supports making a LBFO Team out of "like speed" adapters.
    To solve both of these challenges I standardized the name based on link speed for each adapter before creating hte team.  Pretty simple really!  FIrst I created to variables to store the 10g and 1g adapters.  I went ahead and told it to skip
    any "hyper-V" ports for obvious reasons, and sorted by MAC address as servers tend to put all thier onboard NICs in sequentially by MAC:
    $All10GAdapters = (Get-NetAdapter |where{$_.LinkSpeed -eq "10 Gbps" -and $_.InterfaceDesription -notmatch 'Hyper-V*'}|sort-object MacAddress)
    $All1GAdapters = (Get-NetAdapter |where{$_.LinkSpeed -eq "1 Gbps" -and $_.InterfaceDesription -notmatch 'Hyper-V*'}|sort-object MacAddress)
    Sweet ... now that I have my adapters I can rename them into something standardized:
    $i=0
    $All10GAdapters | ForEach-Object {
    Rename-NetAdapter -Name $_.Name -NewName "Ethernet_10g_$i"
    $i++
    $i = 0
    $All1GAdapters | ForEach-Object {
    Rename-NetAdapter -Name $_.Name -NewName "Ethernet_1g_$i"
    $i++
    Once that's done Now i can return to your team command but use a wildcard sense I know the standardized name!
    New-NetLbfoTeam -Name TEAM1G -TeamMembers Ethernet_1g_* -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false
    New-NetLbfoTeam -Name TEAM10G -TeamMembers Ethernet_10g_* -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false

  • Measure the communicat​ing time between LabView send out commands and response of instrument

    I send a command to a function generator(SRS DS345)using "GPIB Write" via GPIB,to change the frequency of output.And I would like to to measure the time between
    initially send out commands and actual response of instrument(frequency change).I have designed a program which contains three sequences,the 2nd one contains "GPIB Write",and the 1st and the 3rd contain "Tick count",then subtract the latter from first one.I think this is not the time that I want...
    What should I do ?
    Thanks!!

    If want a more precise and NIST-traceable method of timing a portion of your LabVIEW code. The below VI uses two counters on an E-Series or NI-TIO based device to complete this task.
    Download the attached VI and replace the for loop (EVENT TO TIME) with your VI or code.
    This example uses the maximum timebase of your device as the source for "simple event counting". Due to counter roll-over, two counters are used in order to be able to time events of short or very long duration. See VI Documentation for more information.
    Attachments:
    Time_With_Counters_(LV61).vi ‏199 KB

  • Send Ascii command Through RS232 Interface in labview

    Hello,
    I tried to use labview to control the CD2A Compudrive.
    Actually I found the driver of CD2A online in the following link
    http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=266
    but however, I still can't use this driver to send the command and adjust the parameter.
    p.s. Use only "CD2A Setup" or "CD2A Init" should be enough to set the parameter and command, right?
    The command code written in the CD2A Manual is, for example,
    <STX>ST600<ETX><LF>   which is Start of Message,Start Position 600 nm, End of Message, Line Feed
    I've tried to send this using MAX (Measurement & Automation Explorer), but the signal I got back is
    −1073807298
    = Could not perform operation because of I/O error.
    For the command in the driver above,
    The code is written in number form of ascii format  >> e.g. <STX> = ascii 02
    and The Code is written as
    \02ST600\03\r
    But sending this code>> nothing happens
    Which is quite confusing for me.
    1. Is it general to write \02  to send <STX> signal??
    2. actually <LF> = ascii 10  >> so why does it use    /r         instead?
    3. What should I do, is my format correct???  I can't even send one signal to operate it at all.
    Thank you very much for help

    A string control can set for 4 different types of display. When you right click on it, you can select Normal, '\' Codes, Hex, or Password. Normal is ASCII character and the unprintable characters such as <STX> cannot be entered. The <STX> is hex 02 so you enter this as \02. The '\' says to interpret the next byte as hex. A <LF> is not ASCII 10 at all. It is hex 0A. For readability, it was decided a long time ago that certain '\' characters could be represented a bit differently. If \n, that was hex 0A. A \r is hex 0D or the CR. You can find documentation on these stand C Escape Sequences. In LabVIEW, you can type \0A into your control and it will automatically convert or \n.
    Your other option is to use hex display. You just enter all of the hex equivalents though it makes entering the ST600 a bit more difficult in your case.
    I'm not sure if the data entry in MAX is set for '\' Code Display and whether it is interpretting your string correctly. I know that the Basic Serial Write and Read example in LabVIEW is set this way and you might want to try that.

  • How do I send a command to a Line Scan camera?

    Hi,
    I am using the Measurement & Automation Explorer and I would like how to send a camera setting to a line scan camera that uses NI-IMAQ. Any one have any suggestions?
    -Chris

    What I am trying to do is send a serial command to the camera using the Measurement & Automation Explorer. I am also using the PCIe - 1429 framgrabber. Any know how to acheive this? Is this even possible using the NI software?
    -Chris

  • Sending GPIB commands

    Hi,
    How to send string commands to GPIB(IEEE488) from PC?
    The functions "GPIB CMD" and "MISC" not working.
    If use: "cmd 4+0 4" not answer. Why?
    Duke

    Duke,
    I'm not exactly sure what message you're wanting to send to the device; I am not familiar with the BASIC syntax that you are referring to, especially since all your reads, writes, and commands start with the "LISTEN" directive?
    As you may or may not know, you can address a GPIB device to send data or to send a command. To address a device and send data (like a "*IDN?" or some sort of query for measurements), you will want to use GPIB Write and GPIB Read VI's. For commands, you can use GPIB CMD. However, the command value 4 doesn't make much sense by itself. "4" stands for "Selected Device Clear" in the GPIB multiline messages.
    Should you be sending the "4" command (Selected Device Clear)?? Or just the 4 data? If you want to send the
    command, you probably would send a "talker aa, Listener xx, subaddress yy" command to the bus to specify where you want the command to be sent, where aa is the GPIB address of your board, xx is your device's gpib address, and yy is your device's sub address. Look in the links below to construct a string of gpib commands that do this, then you can feed this string into GPIB CMD.
    This link has information about low-level GPIB commands that may be helpful:link
    Here is some getting started info for IBIC, a text-based interactive control for GPIB interfaces that may allow you to experiment to see what exact GPIB command will do what you want: link
    Hope this helps.
    Scott

  • HT1386 This article seems to be based off of an older version of iTunes. With iTunes 11 I have no left side column. The screen shot is not what is on my computer with the latest version of iTunes.

    This article seems to be based off of an older version of iTunes. With iTunes 11 I have no left side column. The screen shot is not what is on my computer with the latest version of iTunes. I need help putting music and pictures on my new iPad from iTunes, the new iPad and latest version of iTunes. Thank you.

    On iTunes 11 you can enable the left-hand sidebar via option-command-S on a Mac, control-S on a PC - it should then look similar to that article.
    Syncing music : http://support.apple.com/kb/HT1351
    Syncing photos : http://support.apple.com/kb/HT4236
    Note that synced photos can't be deleted directly on the iPad, instead they are deleted by not including them in the next photo sync - so you need to include all the photos that you want on the iPad from your computer in each photo sync.

  • GPIB-232CT-A Serial commands problems

    Hi
    I am using the GPIB-232CT-A to send commands to a network analyser
    using the serial coms commands and I am having the following problems:
    1) Network analyser only responds to the command only if I reset the analyser.
    2) I cannot send more than 2 commands. The analyser only responds to the first command.
    Do you know which commands I must use to send more than one command
    without having to reset the analyser everytime I need to send the
    command.
    The command that I use is 'wrt ' .
    Thanks in advance.

    Hi,
    it would be better if you re-post this here http://forums.ni.com/ni/board?board.id=140
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • Windows 8.1 & office home business 2012 - Locks out ALL office programs * There was a problem sending the command to the program*

    Hello,
      I'm at wits end...BRAND NEW HP pavilion preloaded wit windows 8.1. Purchased a separate full version of Office 2012 Home and Business...downloaded it..loaded ...ran it....it runs fine ..UNTIL maintenance or other updates come through....then I receive
    a ** * There was a problem sending the command to the program**** and it lock out ALL office programs with the same message.
    My only fix has been to recover to a date BEFORE the updates or maintenance..and this works..UNTIL the updates or maintenance install....then it's Groundhog day all over again.
    I have tried all the suggested fixes I have found..NONE work..NONE!! And pray tell how you can get into advanced options or any other portion of the programs to turn off the DDE when you cant access the programs or initialize them at all!!!??
    SOS!!

    Hi,
    I have definitely heard your frustration, we can try these steps to check if it works. 
    Note: Before doing the following steps, please make a backup of your registry first.
    1. edit "HKEY_CLASSES_ROOT\Word.Document.12\shell\Open " and delete the "ddeexec" key.  The "ddeexec" key can also be deleted from "HKEY_CLASSES_ROOT\Word.DocumentMacroEnabled.12\shell\Open". 
    2. Change the registry for Word 2013 by right-clicking and saving:
    Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\ddeexec] @="[REM _DDE_Direct][FileOpen(\"%1\")]" [-HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\ddeexec\Application] @="WordView" [-HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\ddeexec\Topic]
    @="System" [-HKEY_CLASSES_ROOT\Word.DocumentMacroEnabled.12\shell\Open\ddeexec] @="[REM _DDE_Direct][FileOpen(\"%1\")]" [-HKEY_CLASSES_ROOT\Word.DocumentMacroEnabled.12\shell\Open\ddeexec\Application] @="WordView" [-HKEY_CLASSES_ROOT\Word.DocumentMacroEnabled.12\shell\Open\ddeexec\Topic]
    @="System"
    3. Double-click the file after downloading to update the registry.
    For more detail information:
    http://www.dilloway.co.uk/there-was-a-problem-sending-the-command.html

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

Maybe you are looking for