Data plc labview

First off thank you for anyone that reads this, I am very new at LabVIEW, and I think this maybe a trival question but I am not sure. 
I am building a test bench to measure the torque vs angle of clutch disc to find the hystersis. I am confedient that my program is fine to record the data. I am usin a servo motor to apply the torque and when the torque gets to high I want the plc to shut off the servo motor. I want LabVIEW for the data acqusition but the plc for the control. I have no experience with modbus. I was wondering if i could share the output from the torque transducer with both the plc and LabVIEW or would this weaken my signal and affect my data? The torque transducer is a mv/v output, the tourque transducer is TRS-20K from transducer techniques. I will be using a PLC from automation direct, and a NI-9237. 
http://www.transducertechniques.com/trs-torque-sensor.aspx
Thansk for your time
Solved!
Go to Solution.

Hello Carl,
It sounds like all you need to do is send an on/off signal to a PLC.  Any communication (modbus, OPC, DataSocket, EPICS) that occurs between the host PC and a PLC is non-deterministic.  These will all result in some form of varying delay. 
The USB-DAQ will be able to output a signal from your computer to your PLC.  If you program the PLC to record the signal from the DAQ to control your transducer, this should work.  There will be a delay between when you send the output signal to the DAQ and the PLC reacts.  This delay will not be deterministic.  It will vary depending on your current operating system usage.  With that being said you should be able to get a response within 100ms.
How fast are you looking to control this PLC?  Do you need the control to have a deterministic/consistent delay? Are you doing closed loop control testing?
Hypothetically, if your computer crashed while the DAQ is in applying torque, you would still be applying torque until you reset the device.  If you continually torque, will this damage any of your setup?  If so, I would recommend implementing some kind of watch dog timer on the PLC which can be reset by the DAQ.
If you are looking for a deterministic solution, I would recommend using a cRIO with LabVIEW Real-time.
Regards,
Thomas C.
Applications Engineer
National Instruments

Similar Messages

  • Siemens PLC S7-300 data to LabVIEW RT via Profibus ?

    How can I acquire Siemens PLC S7-300 data to LabVIEW RT via Profibus ? (My RT is hooked up to SCXI chassis.) There is the PCI-1500 Profibus board - but I'd have to use it on another PC running regular LabVIEW, then get data somehow to the SCXI chassis... that's too complicated! Any ideas ? Thanks! benji.

    We are currently working on a driver for the Profibus cards and LabVIEW RT. I imagine that NI is too. Our intention is to help fill in the Industrial network gaps for LVRT. If you'd like, I'll send you an update in 2-4 weeks. Maybe you can help us beta test it.

  • Writing data from labview to excel

    Hi, currently I'm trying to get an array of data from labview into a specific excel file everytime.
    The attachment i have is a program creating a new worksheet everytime it runs. I couldn't figure out how to make it work. Anyone can help me? 
    Attachments:
    Excel Copy Example.vi ‏19 KB

    So what is the specific problem? What is it doing that is incorrect? If the problem is that it is creating a new file every time its because the first subVI is opening a spreadsheet template file. Or at least I think it is since all of the subvis are missing...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Can a CIN that is in an infinite loop send data to labview without exiting?

    I have a C program that continuously queries a motor controller.  Right now that program is in a labview vi as a CIN.  The problem is that the CIN must exit before reporting the controller response to the labview vi.  This means I have to constantly run the CIN which opens, queries and closes the connection each time.  Is it possible to run the loop in the CIN itself so that the response buffer from the controller can be sent to the labview vi without exiting.  Are there variables types that can be passed from the CIN before completing the CIN? 

    The controller is a Galil DMC4080 motor controller.  I am running Labview under Mandrake Linux.  I can connect and send commands to the controller using a C program.  I modified the C program as a CIN to pass the controller response to the Labview front panel.  Galil has a library of functions used for the controller commands.  LStrPrintf is the command I use to write the data to labview.  Currently I just run this CIN without a while loop and loop it in labview but I recieve an  error message  after  a 1000 executions, see: http://forums.ni.com/ni/board/message?board.id=170&message.id=270220
    If interested here is the current code I am using with the infinite loop. 
    #include "extcode.h"
    #include "dmclnx.h"
    #include "hosttype.h"
    MgErr CINProperties(int32 prop, void *data);
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode);
    MgErr CINProperties(int32 prop, void *data)
        switch (prop) {
            case kCINIsReentrant:
                *(Bool32 *)data = TRUE;
                return noErr;
        return mgNotSupported;
    MgErr CINRun(LStrHandle IPAddress, LStrHandle Command, LStrHandle Response,
            float64 *ErrorCode)
       float          rc = 0;          /* Return code */
       char           buffer[32] = ""; /* Response from controller */
       char           ip[20]=""; /* IP address of controller*/
       char           cmd[20]=""; /* Command to send to controller*/
       HANDLEDMC      hdmc = -1;       /* Handle to controller */
       CONTROLLERINFO controllerinfo;  /* Controller information structure */
       memset(&controllerinfo, '\0', sizeof(controllerinfo));
       controllerinfo.cbSize = sizeof(controllerinfo);
       controllerinfo.usModelID = MODEL_2100;
       controllerinfo.fControllerType = ControllerTypeEthernet;
       controllerinfo.ulTimeout = 1000;
       controllerinfo.ulDelay = 5;
       SPrintf(ip,"%H",IPAddress);
       strcpy(controllerinfo.hardwareinfo.socketinfo.szIPAddress, ip);
       controllerinfo.hardwareinfo.socketinfo.fProtocol = EthernetProtocolTCP;
       DMCInitLibrary();
       /* Open the connection */
       rc = DMCOpen(&controllerinfo, &hdmc);
       if (rc)
           *ErrorCode = rc;
           return noErr;
          while (1)
              SPrintf(cmd,"%H",Command);
              rc = DMCCommand(hdmc, cmd, buffer, sizeof(buffer));
              if (rc)
                  *ErrorCode = rc;
                  return noErr;
                  break;
              else
                  LStrPrintf(Response,buffer);
       rc = DMCClose(hdmc);
       if (rc)
          *ErrorCode = rc;
          return noErr;
       *ErrorCode = rc;
       return noErr;

  • Converting formatted excel date to useful data in labview

    I am using the report generation toolkit for Office, and reading an excel file.  All the data comes back fine, except for the date column.  In excel the column is formatted as a date (ex. 5/5/05) but when it comes through in labview it ends up being something like "37740", it's the same effect if you switch the format in excel to general, the date changes to a number.  Is there anyway to leave the formatting the way it is in Excel and still bring into labview a useful date, or would I have to format the excel file differently?
    Thanks.

    I think I have it figured out using the Excel serial number date.  I attached a vi of something I threw together quickly to convert excel date serial numbers to labview date info.  I'm not 100% if it works all the time, but the few examples I tried worked fine.
    Attachments:
    Excel date to labview date.vi ‏53 KB

  • Plot exel data in labview dynamicall​y

    I would like to plot My Excel data in labview on XY graph, dynamically every 5 seconds.
    i heard that we have to make use of activex.
    Attachments:
    int_ana_110101.xlsx ‏14 KB

    Hi,
    Yes, you can use ActiveX to do this.
    Search "excel" on LabVIEW examples and forums, and you will find a lot of examples to male what you want.
    Best Regards,
    V-F

  • Ideas about storage of spatial data in Labview?

    hello,
    by working on a project i have met such a problem:
    how can i read the data from the spatial database named PostGIS and in which format can i store the data in Labview?

    So you have a remote database (probably somewhere on the file system)...
    This database is a PostgreSQL database.
    Now you want this data to be available on your local machine. The most
    effective way is to simply copy the database. If you do that, you can use
    all code for the local and the remote database. Simply connect to one of
    them, and the queries will succeed. MySQL has functions to create copies of
    the database, and my guess is PostgreSQL has similar functions. So a command
    line call to the database is probably all that is needed to make the copy.
    If you (for some reason I can't imagine) want to read all information from
    the database and store it in a text file, I can't give you all the details.
    I'm not a PostGIS expert. I have no idea what sort of things are stored in
    the database or how it is organized. Going by the manual, it sure looks
    complicated.
    In general, you need to do a query for each table (SELECT * FROM table).
    1) do a query
    2) store the query's result (it is a 2D array, so convert it to a
    spreadsheet string)
    3) repeat these steps, until you queried all tables.
    If you do this, you have all the information in the database.
    Regards,
    Wiebe.

  • Import excel data for labview control

    I'm having some trouble importing excel data into labview. Goals: Input valve flow rates into excel, use those values to control DAQ, have user balance odor with excel defined flow rate, export balance data to excel. Here is what I have so far. Any help is greatly appreciated.
    Attachments:
    Intensity.vi ‏162 KB

    Where in the code are you reading from the Excel Spreadsheet? What VIs are you using? What are the problems are you experiencing (errors, unexpected values, etc.)?
    There is a Read From Spreadsheet File.vi in LabVIEW. LabVIEW uses ActiveX controls for .xlsx files, so saving the spreadsheet as a CSV file may be better for this VI. Try it out! See what happens.
    Here some more info on reading from spreadsheets:
    LabVIEW Manual: Read From Spreadsheet File VI
    KnowledgeBase article: How Can I Import Spreadsheet Files into LabVIEW using the .csv Format?
    Taylor B.
    National Instruments

  • How can we share and transfer data at Labview using the internet

    How can we share and transfer data at Labview using the internet
    Dr. Eugene Berman, Moran Kamilyan and Ravit Bar

    [email protected] wrote:
    How can we share and transfer data at Labview using the internet
    Check these links:
    Basic TCP/IP Communication in LabVIEW
    Data Sockets
    Integrating the Internet into Your Measurement System

  • How can I read the trace data into LabVIEW for E5071B

    HI 
    I am setting up the measurement using vector network analyzer (VNA) E5071B controlled by NI 488.2. How can I read the trace data into LabVIEW and display on the graph? If anyone having an idea or know well about this process please give me the suggestion, I will much appreciate it.
    Many Thanks

    You want to start with the driver
     In case you do not know it, you can do the driver search in LabVIEW from Tools>Instrumentation>Find Instrument Drivers. You might also want to bookmark the Instrument Driver Network for information on what a driver is and how to use it.

  • Output data from LabVIEW, input to C++ code

    I currently have a LabVIEW VI which grabs data (range and angle measurements) from the RS232 serial port, and formats this data into two values - X and Y coordinates (double data types).  What I want to do is pass these individual numerical values (not an array of X/Y coordinates) to a C++ gesture recognition program that inputs X and Y coordinates and determines the gestures.
    What is the best way of passing a value from LabVIEW to C++ code?
    I apologize if this was answered in another thread - I searched through some, but couldn't find any information relevant to my question.  Thanks for the help!

    Hi delvec28,
    delvec28 wrote:
    I currently have a LabVIEW VI which grabs data (range and angle measurements) from the RS232 serial port, and formats this data into two values - X and Y coordinates (double data types).  What I want to do is pass these individual numerical values (not an array of X/Y coordinates) to a C++ gesture recognition program that inputs X and Y coordinates and determines the gestures.
    What is the best way of passing a value from LabVIEW to C++ code?
    I apologize if this was answered in another thread - I searched through some, but couldn't find any information relevant to my question.  Thanks for the help!
    You may want to build a DLL.  A DLL is like a collection of functions - compiled in a way to be used by other programs.
    If the C++ code calls a LabVIEW function which returns values to the C++ code, then the LabVIEW code will be compiled as a DLL.
    C++ code could also be compiled into a DLL usable by LabVIEW.
    There are also ways for separate applications to share data - LabVIEW can be an ActiveX server, LabVIEW also supports DDE (Dynamic Data Exchange)  - these are both Windows-OS-specific.  LabVIEW can be a .NET client, though (as far as I know) LabVIEW cannot yet implement a .NET server.
    TCPIP is yet another (OS independent) method of sharing data between LabVIEW and another application - it's really not too complicated (at least not on the LabVIEW side .)
    Are there two applications running (C++ + LabVIEW)?  If not, in which language is the main program written in?
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • I would like to build I data base in teststand which collect data from labview , if you have example (sequence) that give me some way to build sequence

    I would like to build a data base in teststand which collect data from labview program , if you have example (sequence) that give me some way to build sequence that have step of action for labview and step
    data base

    There is an example in the \TestStand\Examples\Database directory. Basically there are two ways to connect to your database.
    1. You can use the TestStand database step types. There are steps for opening/closing a database connection, opening/closing an SQL statement, and a step for performing a data operation.
    2. The other way is to use the TestStand database logging capability to write your results to the database. This is the way I would recommend. With database logging, you use the step results container to record all your results as the sequence runs. (This is done automatically by TestStand). When the sequence is complete, the process model calls a "Log to Database" sequence that will write the results to the database. You must define your datab
    ase schema using Configure->Database Options. There are some default (or example) schema definitions already defined. Refer to chapter 18 of your TestStand manual.
    Another way to log the data as the sequence is running is shown in the \TestStand\Examples\OnTheFlyReports. This has the advantage of recording data as it is obtained, but it is not as efficient in terms of using a database connection. I don't recommend using this method.
    Please post again if you have any more questions. If you are using stored procedures with your database, I can probably give you some tips.
    Mark

  • Acquire data using Labview VI and process in matlab.

    hello,
            I wish to read data for two analog inputs using a NI DAQ USB 6356 and process it in matlab. I do not have matlab data acquisition toolbox. My Matlab code includes a mex file. I am planning  to start with an example vi for data acquisition and put into it a matlab script node which would have my matlab code and will also call the mex file. I just want to know if this method is at all possible or if there is a better way to do it. At this time it would be sufficient if I just get a fixed number of samples and send it to Matlab, i.e I do not need any real time processing.
    Umar.

    Hi Umar,
    Unfortunately we do not have Matlab within the office here so I'm unable to replicate your issue. On searching the details of the error you're experiencing on the MathWorks(R) website the explaination behind the error is:
    Explanation:The number of left parenthesis is not equal to the number of right parenthesis in your expression.
    Common causes:You added a left parenthesis or removed a right parenthesis from the line of code.
    Solution: Count the number of left parentheses and right parentheses on the line of code. Verify that the quantity of the two types of parentheses are equal. Add in an appropriate number of right parentheses or remove extraneous left parentheses.
    This suggests that the number of opening brackets does not equal the number of closing brackets, however on reviewing your code it seems that this is not the case. Would it be possible to run the Matlab Toolbox code on an older version of Matlab? It may also be worth reducing the "Samples_per_Channel" and "Sample_Rate" to much lower levels to see if the code executes.
    Another solution might involve sampling the data within LabVIEW and then exporting the data to a *.csv data file which can then be easily imported for analysis within Matlab 2011. In this case invoking Matlab following data acquisition using a "Matlab Script Node" would be the best option.
    Kind Regards
    Jamie S.
    Applications Engineer
    National Instruments

  • Get Siemens LOGO OBA7 data in Labview through Ethernet Port

    Please help me get the Siemens LOGO Status including Network ouput data to a Labview program.
    Is there any Siemens OBA7 drivers in Labview.
    Please Help.
    Thank you in advance
    Regards
    Grugh Mike
    Success is Everything !!

    hi,
    i am also looking to communicate to a siemens logo! PLC 0BA7 via ethernet using labview. the LOGO! documentation doesnt say much about ethernet communication. i tried a simple labview code which i have attached here, error message shows the connection has been refused. i have set the LOGO! to slave mode with my PC as the master I/P but still get this error (see attached jpeg). i apologise in advance i am a relatively new to LabVIEW and TCP comms.
    Attachments:
    LOGO! TCP.JPG ‏225 KB
    LOGO! TCP.vi ‏9 KB

  • Questions on Saving and mining data with Labview and DIAdem

    Hi,
    I am sampling two signals at 200k sampling rate. I am trying to save the data on harddisk and analyzing the data using DIAdem.
    If I save the data using mesurement file format .tdm and .lvm, the file size will be about 4 Gigabytes for only 10 mins' acquisition. It is very slow to process it.
    I used the software Clampex and pCLAMP(Axon Instruments) before. At the same 200k sampling rate and also acquiring two signals, these programs save the data as .atf format and the size is only 400 MB for 10 mins' acquisition.
    I wonder if there is also a good way to handle this situation using Labview and DIAdem, and how to do it?

    Hi, Jonathan:
    I tried the TDM binary file format. The file size is 800 MB per min acquisition and it will take a long time to just open these files. For my application, I have to take data for several hours. I am looking for a way to reduce the size of files.
    Is there any other type of file format that can reduce the size significantly and can be handled easily?

Maybe you are looking for

  • Cisco CSC Web Filtering and Citrix\Ts users

    Hello we need to buy a cisco CSC module for cisco ASA, and we're using Citrix Presentation server and Terminal Server Users, is CSC capable of ahtentitcate transparent the users in citrix (x users are using same IP)?, the CSC uses ntlm for this?, tha

  • Using Macbook as a HTPC, should I keep the battery in it?

    So today, I had a quick brown out from the wind. Since the macbook I use connected to my TV as a HTPC doesn't have a battery, it instantly turned off. I took the battery our cause it got real real fat. There is known issue with these batteries that f

  • Video comparison between the 6270 and 6280

    What is the maximum video resolution of the 6270? Does it have 640 x 460 resolution that the 6280 has? And for anyone who has handled both, is there much difference between the two for operating systems, camera quality, memory and the lot? Grateful i

  • BI Publisher- Display Parameters?

    How do I display parameters in a report? I do a select * from table_name where vendor_name = :parameter1 and start_date = :parameter2 and end_date = :parameter3 I can display all the * but the parameters...how do I show them?

  • Rows to string conversion

    Hii..Experts, I have a big problem in SQL.. Plz help me to solve the Query. Let's I have a table 'table1' having columns A,B,C,D,E, and my table structure is like this. A B C D E 1 4 1 4 1 2 5 2 5 2 3 6 3 6 3 I want to show the result like this: 1 4