Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Facebook Adept Scientific on Twitter Adept Scientific on YouBube Adept Scientific on LinkedIn
Knowledge Base  > Browse Categories  > WinWedge
Can WinWedge send data to an instrument?

Email This Article

To email this article enter and address below and click on the "Email" Article button.



Other resources from Adept Scientific for: WinWedge

  • WinWedge Product Information
  • Download WinWedge resources from our Download Centre
  • Buy WinWedge online from our Webstore
  • Read WinWedge FAQs
  • Read WinWedge technical articles from our KnowledgeBase


    Last Modified: 3rd Jan 2013
    Category: Laboratory Applications > WinWedge
    Platform: All
    Version: All
    Article Ref.: 13D4E
    »Return to previous search
    »Print friendly version of this article.
    1 person has found this article useful.

    I am saving data to disk as an ASCII text file. Could I use WinWedge to send this data to a machine with an RS232 output?


    This can be done using a macro in Excel or Visual Basic. One of the DDE Commands supported by WinWedge is "SendFile". Thus the following Excel macro would send the file data.txt out the serial port COM 2:

    Sub SendMyFile()
    Chan = DDEInitiate("WinWedge", "Com2")
    DDEExecute Chan, "[SENDFILE('c:\data.txt')]"
    DDETerminate Chan

    End Sub

    Alternatively, a string of control codes can be sent out of the serial port by issuing the DDE command "[SendOut()]" to WinWedge. This example sends an escape character (ASCII 27), a capital "P" and a carriage return-linefeed (ASCII 13 and ASCII 10).

    Sub SendEscapeP()
    ChannelNumber = DDEInitiate("WinWedge", "COM1")
       DDEExecute ChannelNumber, "[SENDOUT(27,’P’,13,10)]"
       DDETerminate ChannelNumber
    End Sub

     
     
    Related Articles
    adept

    Top of the Page

    Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

    EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
    All Trademarks Recognised. Copyright © 2013, Adept Scientific plc.
    Site designed and maintained by Lyndon Ash

    Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055