int DSBindPlot (int panelHandle, int controlID, int plotID, char *URL, DSHandle *DSHandle, HRESULT *dataSocketError);
Binds a graph plot to the DataSocket connection specified in the URL parameter.
Linux This function is not supported.
A plot can be bound only in READ mode. If you pass -1 for plotID, LabWindows/CVI creates a new plot.
For some protocols such as dstp, the DataSocket server must be launched on the machine referenced in the URL.
Input | ||
Name | Type | Description |
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. |
plotID | integer | The ID of the graph plot to be bound to the data source. If you pass -1, LabWindows/CVI creates a new plot. If plotID is invalid, DSBindPlot returns an error. If you specify a plot ID at bind time, the access mode must be READ. In this case, the type of plot you specify must be compatible with the data type in the DataSocket source. Valid plot types are X, Y, waveform, point, intensity, scaled intensity, and text. If you do not specify a plot ID at bind time, and the access mode is READ, the graph control creates a plot dynamically that matches the data type in the DataSocket source. Use ATTR_DS_BIND... attributes to set initial preferences for this plot. |
URL | char* | The URL of the data source for the DataSocket object's connection. The URL you pass can resolve to different types of data sources. A URL consists of a scheme and a data source path. The scheme specifies the type of data. The DataSocket library supports the following URL schemes: http—hypertext transfer protocol ftp—file transfer protocol file—local files dstp—DataSocket transfer protocol opc—OPC (OLE for Process control) servers logos—an internal National Instruments technology for transmitting data between the network and your local computer fieldpoint—a protocol that uses the National Instrument logos protocol to send and receive live data to and from a National Instruments Fieldpoint module The data source path specifies the exact location of the data. The format of the data source path depends on the URL scheme. URL examples http://www.natinst.com/cworks/datasocket/chirp.dsd ftp://ftp.natinst.com/support/compworks/datasocket/chirp.wav dstp://localhost/wave dstp://weather.natinst.com/weather/current file://datafiles/newwave.txt opc://machine/National Instruments.OPCDemo/SINE:0.0..8.0:2.0 logos://computer_name/process/data_item_name fieldpoint://computer_name/process/data_item_name |
Output | ||
Name | Type | Description |
DSHandle | DSHandle (passed by reference) | A handle that you can use to identify the DataSocket object in subsequent function calls. The handle is never 0. The status of the connection between a bound control and its DataSocket data source can be obtained by passing the DSHandle to DS_GetStatus. The DSHandle received from DSBindCtrl should never be passed to DS_DiscardObjHandle. Call DSUnbind to unbind the control. |
dataSocketError | HRESULT (passed by reference) | The HRESULT if this function causes a DataSocket error. A value of NULL can be passed in if the HRESULT is not needed. In the event of a DataSocket error, this function returns a value of UIEDataSocketError. |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|