How can I use the output value from SIMPLE PID to write something to the serial port?

I am working on my Senior Design Project that requires the use of incoming compressed air, propotional valves, continuous servo motors, and a serial servo motor microcontroller.  I have figured out how to send byte sequences to the microcontroller through LabVIEW using the VISA serial write function.  The motors are attached to the valves to control the flow rate.  I have created my own simple feedback system using a bunch of case structures but I realized that I am basically trying to recreate the wheel (I basically was writing my own PID VI).   I have an older version of LabVIEW (7.0 Express) and theres no way to upgrade or buy the PID toolkit, so I am stuck using the Simple PID VI.  Also, the only way the motor works is sending an array of bytes to tell it to turn on/off, direction, and speed.  Is there any way I can use the Simple PID VI in conjunction with the VISA SERIAL write function, or is there any other way I can communicate with the serial port using this pid vi?  Any information would be appreciated.

Hi gpatel,
you know how to communicate to serial port, but you don't know how to send a value from SimplePID to serial port???
You know how to communicate, but then you don't know how to communicate???
You should explain this in more detail...
Edit:
From you first post you know what values your motor driver is expecting. You know which values the PID.vi is providing. Now all you need is a formula to reshape the values from PID to the motor. It's up to you to make such a formula. Unless you provide any details we cannot give more precise answers...
Message Edited by GerdW on 02-28-2010 08:35 PM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • How can I use an iteration value from a "while" (or "for") loop as part of a filename?

    I am using the "Write To Measurement File" function  inside a while structure and would like to incorporate the iterative value from the while-loop as part of the file name. I'm not sure how to do it. Any suggestions?

    Like this:
    Edit: Oops. Sorry for the double answer.
    Message Edited by smercurio_fc on 05-22-2007 04:25 PM
    Attachments:
    Example_BD.png ‏3 KB

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • How can I move my iPhoto Library from one Mac to another without losing the comments on the individual photos in the process?

    How can I move my iPhoto Library from one Mac to another without losing the comments on the individual photos in the process? The source Macbook (OS 10.4.11 and iPhoto 6.0.6 (3.2.2.)) is with my husband in Germany, the target MacBook Pro (OS 10.8.5, iPhoto 11) is with me in Japan. Thanks for your help.

    I copied the iPhoto Library to a CD and from there to the new MacBook
    If you copied the library to the CD via the Finder it would be no different than the methods Terence suggested.  If you used the Share ➙ Burn menu option from inside iDVD you'll get a mini library that has to be accessed from the open library and the events/alubums copied into the destination library.  Not the same as the other methods.
    The Share ➙ Burn method is no longer supported with iPhoto 9 and later.
    OT

  • How can I use FREQ_OUT output frequency signal

    Now,I use VXI-MIO-64E-1 board and Windows/CVI,I want to know how can I use FREQ_OUT single.
    Thanks a lot,
    Wang

    The Frequency Scalar of the DAQ-STC based devices is essentially a third counter that can be programmed only for continuous pulse train generation. See the knowledgebase link below for more info on this. Since this counter is only four bits, this limits the clock divisors to 2^4 or 1 thru 16. Therefore the only frequencies that can be programmed for output on the FREQ_OUT line are timebase / (integer between 1 and 16).
    How do I use the FREQ_OUT pin on my E series board?
    According to the NI-DAQ Function Reference Manual, the signal name should be ND_FREQ_OUT. The source can then be ND_NONE, ND_INTERNAL_20_MHZ, or ND_INTERNAL
    _100_KHZ. sourcespec would follow respectively as ND_DONT_CARE, 1 through 16, or 1 through 16. Note that selecting ND_NONE will disable output on the FREQ_OUT pin.
    Thanks,
    Heath

  • How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • How can i use my iphone 4 from japan in india

    how can i use my iphone 4 from japan in india

    The only way to use an iPhone from Japan in India is to pay your Japanese carrier for international roaming. Japanese iPhones can not be unlocked.

  • Ethiopia doesn't figure on the countries list. How can I use Itunes store in Ethiopia?, Ethiopia doesn't figure on the countries list. How can I use Itunes store in Ethiopia?

    Ethiopia doesn't figure on the countries list. How can I use Itunes store in Ethiopia?, Ethiopia doesn't figure on the countries list. How can I use Itunes store in Ethiopia?

    If there is no iTunes Store in your Country... Then there is no iTunes Store you can use...
    iTunes Store: Which types of items can I buy in my country?

  • How can i erase my .me mails from my iPhone and keep them in the server

    how can i erase my .me mails from my iPhone and keep them in the server

    You can't. The iPhone doesn't actually store all your emails anyway. It is showing you what is on the server directly.
    Only the most recently accessed emails are cached (stored temporarily) on your phone for access when you are offline. If you delete an email from your iPhone, you are actually deleting it from the server.

  • I have lost all of my keynote templates now that I have upgraded to yosemite.  How can I use Keynotes and pages etc on my computer and not on the cloud.

    I have lost all of my previously created keynote templates now that I have upgraded to yosemite. How can I use Keynotes and pages etc on my computer and not on the cloud.

    Welcome to Apple Support Communities
    All iWork apps allow you to save your documents on your computer. You will be able to choose the destination when you want to save a document.
    You can also disable iCloud for some apps. To do that, go to System Preferences -> iCloud, press "Options" next to "iCloud Drive" and disable the apps you want to.
    If you have lost your old documents, you should have a backup that you made before upgrading to OS X Yosemite, so you only have to restore it.

  • I just moved from Germany back to the USA. How can I use an German iPhone6 from T-Mobile  in the USA

    I just moved from Germany back to the USA. How can I use an German iPhone 6 from T-Mobile  in the USA?

    Was your phone locked to T-Mobile? If so, it needs to be unlocked before you can use it here. I believe you can use it with AT&T or T-Mobile here, but you won't get 4G/LTE speeds.
    ~Lyssa

  • How can I use "Make Current Values Default" Programmatically?

    When I use this method in a Invoke node, I get the error code 1000, then i can't use it in run mode?
    How can I modify the default values in a Built aplicattion, and save for the next time I load it?

    Hi,
    I've attached a small demo to show setting up the front panel control. The VI Change Control Value.vi is the one you run. Demo.vi has one control on the front panel whose value is setup by Change Control Value.vi. Just unzip the file, keeping the two VI's in the same folder. You don't need to open the Demo.vi.
    I've used this mechanism onlong with a config file when creating a Virtual Instrument Driver.
    Regards
    Ray.
    Regards
    Ray Farmer
    Attachments:
    demo.zip ‏23 KB

  • How can I use a different computer from the one on which the initial setup was run for my iphone 3gs?

    I would like to use my new MacBook to manage the information on my iphone.
    Attempts to use any other computer other than the original one used in the initial setup generates a message that warns me that everything on the iphone will be erased? How can I back up the information and switch to the MacBook?

    Copy your entire iTunes folder to your new computer (see http://support.apple.com/kb/HT4527).  Then carefully follow the steps in wjosten's post here: https://discussions.apple.com/message/13356770#13356770.

  • How can I read an ID-value from the LMS and insert this into an URL?

    Hi
    Right now I am struggling with a little problem. Hopefully anyone here knows the answer. For the latest course I am building (Captivate 6), it is necessary that at one point the course reads an ID-value from the LMS. After that, this ID should be inserted into an URL.
    To be more precisely: the ID must be read (getValue) from cmi.archive_id and inserted into an URL like that: http://.../archive.php?action=pdf&objectID=ARCHIVE_ID.
    Unfortunately I am more of a designer und less of a javascript-maestro (well...I am a javascript-noob to be precisely), therefore I am pretty clueless how to do that. I tried a simple executed action (run Javascript: cpEIGetValue('cmi.archive_id'); and after that open URL http://.../archive.php?action=pdf&objectID=ARCHIVE_ID), but...well...that didn't work.
    Any ideas?
    Thanks a lot in advance

    Think you'll find help looking at Jim Leichliter's website:
    http://captivatedev.com/
    He has great tutorials about JavaScript and also a widget that allows to enter a variable in URL's
    Lilybiri

  • How can I use a timestring saved from LV as a csv spreadshee​t file as the x axis of a LV chart?

    I'm saving the timestring portion of a timestamp as HH:MMS  along with each set of data fields to a cvs spreadsheet file, i.e. each row of the file starts with the timestring followed by data in each remaining column. The first row contains data field headings. I can read this file back into LV with no problem and can remove the header row but cannot find a way to use that timestring as the x axis of a chart graph. I have no problem graphing the data in that format within Excel itself. Can anyone help?
    Thanks,
    DennisR

    Check the timestamp indicator, it is trying to write your time-stamp to your time-zone, so you will need to change the time-stamp to universal time. For the time-stamp indicator it is easy enough you just need to edit the indicator to display universal time, however for a purely data sense it is a bit odd, I have never found a straight forward way to do it so I use the conversion between Time in Seconds and Date/Time to do it for me.
    Attachments:
    Time Extract.png ‏21 KB

Maybe you are looking for

  • Adobe Flash Player does not work

    Suddenly all web sites using Flash Player no longer work showing the error message that I will have to install the latest Flash Player. I followed instructions in help and I used the uninstaller and resinstalled but it still doesn't work on any web s

  • Cant Delete ITunes and Redownload

    ITunes wont open on my computer, it says a file is missing. When i try to delete Itunes in control panel it wont let me because the file is missing. What do I do??? I really dont want to lose the money sitting in my store and want to be able to use m

  • Lightroom 5.3 import crashes while trying accessing a AFP share

    Hello, I am using Lightroom 5.3 on the latest OS X Mavericks 10.9.2. For unknown reasons I can´t access photos which are located on my freenas server on a AFP share. Lightroom got stucked when I opened the folder with the remote images. I deleted thi

  • Java won't wont work outside of my browser

    Well things inside my browser work perfectly but things outside my browser just don't work at all like when I click run on something it comes back as "'JAVA' is not recognized as an internal or external command,operable program or batch file." Does a

  • Scehuling

    Hi, 1.Q After first time schedule, some activities are confirmed and some are partially confirmed. Now When i run schedule again, does dates of subsequent activity are changesd? If yes, then does system stores the first time schedule dates any where.