Datasocket and FP2000

Hi,
I'm develpoing a RT acquisition/control system using FP2000. On FP 2000 I've wrote two main VI:
- TC.vi: time critical VI for acquisition and control of my system
- NP.vi: normal priority VI for data exchange with a host PC.
Host and FP comunicate using datasocket.
PROBLEM: when FP isn't connect to the network after about 12 minutes the status led become red and stay lit. I'm sure ther's no electrical problem (I've verified the same problem using one FP2000 alone).
some ideas?
Thank you,
paolo.

Paolo,
One possibility is that you have the the option "Halt if TCP/IP Fails" selected. To turn that option off, use the FieldPoint software and unselect the option in the Network Settings page under Remote Systems.
A second possibility is that your communications loop is not handling the lack of communications properly. You should include error handling that is designed to handle the lack of communications errors.
Regards,
Aaron

Similar Messages

  • Datasocket and Shared Variables

    I am curious if there is any advantage to using Datasocket to read/write shared variables (as opposed to a direct read/write).  I'm specifically talking networked shared variables here.
    Is there any speed advantage to accessing shared variables thru the Datasocket functions?  Since both a direct read/write and a Datasocket PSP read/write talk to the same variable engine I assume they are equally efficient but I'm looking for confirmation here.  I've seen benchmarks for shared variable performance but none of them use DS/PSP to access the variables.
    Normally I would not even think of using Datasocket to access shared var's but where I currently work we have a large app that does this and it works great.  I suspect that this functionality only exists in LV8.x for backward compatibility and non-Windows OS compatibility and is not really meant to be used for new, Windows-based apps?   Am I off base on this?
    I am working in LV 8.5, BTW.....

    Hello Jared,
    Thank you for the reply with clarification. 
    Based on your comment, I changed the buffer parameters and also tried the programs with two different data types, previously StringArray and now String.
    In the attached LV8.6 project, you have all the programs, and shared variable library to review my tests. 
    There are two sets of two files - each set has a Write Shared Variable and Read Shared Variable file. One set is for StringArray type Shared Variable (named StrArr in the library), and the other set is for String type Shared Variable (named Str in the library).
    String Array example:
    MultipleDS-Write-SharedV-StrArr.vi / MultipleDS-Read-SharedV-StrArr.vi
    In my String Array shared variable, I use only 4 element array, each having 4 character strings - meaning 16 bytes per String Array data. I have two loops in the write file, writing to the same variable, an array of 4 strings, each loop continues until the loop index is >0. This means, sometimes, depending on the processor speed, the variable will be written 3 times or 4 times (the variable could have a new value before the loop condition is checked).
    So this means, if I have buffer of 100 bytes (16*4=64<100), it's enough for 4 such arrays (of 4 elements, each element with 4 characters) could be buffered to have sufficient time at the client (Read) program to read them. 
    I am putting 2048 bytes in buffer, which is much more than sufficient in my case. 
    The writer loops run with 200 ms to wait for each iteration. The reader loop runs with 100 ms in DS timeout and 100 ms in wait timer. This gives results without any loss. However, if I run the reader loop with 1000 ms to wait for each iteration, the data is lost. The buffer is not maintained for 2048 bytes.
    In the read program, just to make sure if all data is read or not, I am showing data in two different string indicators, showing data of each loop.
    String example:
    MultipleDS-Write-SharedV-Str.vi / MultipleDS-Read-SharedV-Str.vi 
    The String Array shared variable didn't show values in the Distributed System Manager. Hence, I created another simple variable with String datatype.
    The writer program writes strings of 4 characters, one-by-one, in two loops. Meaning, total 8 strings of 4 characters each are written in the "Str" Shared variable. 
    The reader program, however, doesn't always display all the 8 strings. Although the wait timer is not high (slow) it still misses some data usually. Data is overwritten even before the buffer is filled (in buffer, I have defined 50 strings with 4 elements in each).
    In both of the Read programs, I read using datasocket. I think thought datasocket has more ability to buffer. Earlier I had "BufferedRead" in DataSocket, which I have changed to just Read, because BufferedRead didn't give any special buffer advantage in the Shared Variable reading.
    ---- This is an update on the issue. 
    Ok, just while typing the last paragraph above, regarding datasocket, something clicked in my mind, and I changed the DataSocket functions to simple Shared variables (completely eliminating datasocket functions) in the read programs as well. And bingo, the buffer works as expected, even if I have reading loops very very slow, there is no data loss in any of the program sets. 
    The two changed Read programs are also included in the attached project - MultipleSV-Read-SharedV-Str.vi and MultipleSV-Read-SharedV-StrArr.vi
    So this means, I can completely eliminate DataSockets (not even using PSP URLs in DataSocket Open/Read functions) from my programs. 
    One question here, what will be an advantage of this (or any side effects that I should be keeping in mind)?
    Vaibhav
    Attachments:
    DataSocket.zip ‏71 KB

  • DataSocket and two NICS?

    I have an application where I want to communicate through two separate NICs
    from one computer using DataSocket. LabVIEW 7.0 now supports multiple NICs
    for TCP/IP but is this also possible with DataSocket? If so, how do you
    control which NIC you go through? I couldn't find anything in the
    DataSocket Server that allows you to specify which NIC you are using.

    Hello nealpederson,
    Thank you for your question regarding DataSocket. You mentioned that you would like to communicate through two separate NICs using DataSocket. This feature is not available in DataSocket. One possible solution may be to run DataSocket server on the client computers and send data to the desired target IP address on the computer with multiple NICs. However, LabVIEW would most likely send data out on all the cards that you have installed on the computer with multiple NICs.
    Other resources can be found on the ni.com website by clicking the support tab at the top of the home page. Then search from Technical Resources at the top of the page for your topic. I hope these resources help! Let me know if you need any other support with this issue.
    S
    hea C.
    Applications Engineering

  • Datasocket and Event Structure.

    I have developed a labview aplication that control some pumps and send the setpoint to some PID controllers in my test laboratory. this aplication run fine with Event Structure. I have developed too, a small labview software that use Datasocket to connect to previous software, the problem is that when i press a control from client (the control change in server) the Event structure don´t detect the "value changed" event, why? How could I find a solution?
    Thanks in advance

    Hi!
    I came up, with this simple solution and it works with my datasocket appz.
    Have a nice day!!
    Attachments:
    prog2.JPG ‏15 KB
    fronpanel.JPG ‏11 KB
    prog1.JPG ‏16 KB

  • DataSocket and window resize

    Does somebody have an idea about a DataSocket error (for OPC protocol) "-2147417843 DataSocketUpdateData.vi can't read data" occuring when the user resizes the running window using Windows classical upper right button?
    Thank you for your help
    Jean-François COUPAT
    Fabricom Systèmes d'Assemblage

    Bonjour,
    Merci de vous intéresser à  mon problème.
    Les 3 vi joint sont appelés cycliquement, car le programme Labview est "esclave" d'un Automate Programmable avec lequel il échange des commandes par l'intermédiaire d'un mot d'état.
    La connexion DataSocket est établie par programme. La version de Labview est 7.1.
    Le programme fonctionne, mais le fait de réduire la fenêtre de la face avant semble perturber la connexion DataSocket.
    Salutations
    Jean-François COUPAT
    Fabricom Systèmes d'Assemblage
    Attachments:
    InterfaceOPC_parametre.vi ‏80 KB

  • Cluster and DataSocket

    Hi there,
    I´ve a problem with DataSocket and Clusters containing several variables (Strings, boolean Array and Numerics) .
    One PC aquires data (DataSocket server). The other PC connects as client to the DS server and indicates the data. The problem is as followes, if I make a screenshot at the same time on both PCs, the data is not equal. That's a kind of normal I know, but I started a counter (T = 100ms) and it differs about 4..5 (on the server counter = 100, on the client at same time counter = 95)!!
    Now, I´ve connected the counter to a seperate indicator and connected it alone over DS. --> The counter value is now equal on both sides (server and client side)!
    What might be the problem!? 

    Hi If I understand your description correctly!
    Then your client cannot recieve Data before the Data Server has recieved the data and sent onto client.
    Where as with your counter your are sending the data to on indicator directly.
    It would be easier to provide possible solution if a picture was provided (NOT BMP but jpg or png)
    xseadog

  • FP-2000 and Datasocket Server

    Hi all,
    I'm attempting to use an FP-2000 to publish data via datasockets within it's
    own server. At the moment I can get the FP-2000 to publish to a datasocket
    server based on the client PC, however this is not a satisfactory situation.
    Is it possible to publish to an internal datasocket and have the remote
    software connect to this datasocket connection? If so, how do I go about
    doing that. I don't want to use the Publish Data style of communications as
    I would like to transfer clusters and the like.
    Thanks in advance.
    Regards,
    Shane Broadbent

    Hi Aaron,
    Thanks for your answer. It was the expected answer, but not exactly what I'm
    after. Oh well I'll see if I can modify the Datasocket routines so that
    there isn't a reliance on the PC or network being up for the code to
    continue.
    Regards,
    Shane Broadbent
    "Aaron G" wrote in message
    news:[email protected]..
    > Shane,
    >
    > The FP-20xx's do not have datasocket servers on them. The only server
    > is the NI Ethernet protocol server which you access via the Data
    > Publish.vi. The Data Publish.vi supports four base types of data;
    > boolean, integer, float and string. You can use the Flatten To String
    > or Typecast functions to convert the cluster data to string and then
    > use the Data Publish.vi
    to publish the string. The host side can then
    > unflatten the string data.
    >
    > Regards,
    > Aaron

  • How to read enumerated values from an OPC server via Datasocket

    Hi Labviewers,
    I am using LV8.2 and I am trying to find if it is possible to read enumerations from an OPC server via Datasocket, not just the values.
    I can successfully read a value for an OPC server via Datasocket and I get a value for example 3, is it possible to get the enumeration/string that corresponds to this value i.e. "Open".
    Many thanks in advance
    Dimitris

    Hi Sarah,
    With the input type as variant I get the following response:
    1                                     <-This is the current numeric value of the parameter
    4 Attribute(s):
       'Quality' -> 192
       'TimeHigh' -> 29861723
       'TimeLow' -> -665408304
       'Timestamp' -> 39.238E+3
    With the Input set to         Enum constant I get no values or strings coming back. With the Input set to                Ring constant I just get the numeric value   
    Dimitris   

  • How do I detect whether a publishing object is connected to the datasocket server or not?

    I have 2 vis which communicate via datasocket. The behaviour of the second vi depends on whether the first vi is running or not, and both vis can be started and stopped independently of each other. I need vi 2 to be able to detect whether vi 1 is running or not. Simple, I thought, I'll have a boolean in vi 1 called Running which is set to True when the vi is running and False when it shuts down. I'll publish that vi to datasocket and have a matching boolean in vi 2 which subscribes to it.
    It doesn't work, because as soon as vi 1 stops, Running disconnects and the matching boolean in vi 2 misses the fact that it got set to False before it disconnected, and just gets stuck in the True state.
    So it seems to me there should be a "Is object connected?" vi or function somewhere, but I can't find it.
    Is there another way to detect whether a vi is running or not? Preferably without using shared globals as I find that quite ugly, in fact I've switched to using datasocket from using shared globals because the latter just seemed like really ugly programming.
    Note: I will have several variants of vi 1 with different names, so I can't just try to open a reference to the vi. That's why I wanted to use a datasocket object; all the versions of vi 1 can have a boolean called Running.

    I found a solution. The subscribing boolean in vi 2 is now in its own little loop that executes every 50ms in parallel to the main program loop.
    In vi 1 there is a delay of 500ms between the publishing boolean being set to false and the vi stopping.
    That way the subscriber boolean has plenty of opportunity to read the False state of the publisher.

  • DataSocket PSP Data Buffering

    I have a VI that writes to a network shared variable using DataSocket.  The DataSocket URL uses PSP.  I have another VI that reads the network shared variable also using DataSocket.  I am experimenting with data buffering to see when data is lost if the Writer VI writes faster than the Reader VI.  Is data buffered using DataSocket with PSP in the URL?  If not, I expect data will be lost.  If it is buffered, I don't expect data to be lost until the buffer is full or overflows. 
    Attached is a project with the network shared variables and the Writer and Reader VI.  VIs compare reading and writing directly using a shared variable node and using DataSocket.  With DataSocket, I am experiencing data loss as if there is no buffering.  When using the shared variable node, I do not see data loss.  Run the Reader.vi.  It will read two network shared variables every two seconds.  One variable is read using DataSocket and one is read using a variable node.  Next, run the Writer.vi.  It will write to two network shared variables every 0.5 seconds.  One variable is written using DataSocket and one is written using a variable node.  Since the Writer VI is writing four times as fast as the Reader VI data will need to be buffered to avoid data loss.  Monitor the Buffered Sequence and BufferedDS Sequence front panel indicators in the Reader VI.  Buffered Sequence is data from the variable node.  BufferedDS Sequence is data from the DataSocket Read.
    Solved!
    Go to Solution.
    Attachments:
    Net Share Var & DataSocket.zip ‏49 KB

    Does PSP in the DataSocket URL change the data buffering?  Attached is a page from 'LabVIEW 8.5.1 help/fundamentals/networking in LabVIEW/concepts/choosing among LabVIEW communication features' mentioning lossless data transmission for DataSocket with psp protocol(2nd row in table).  Does lossless data indicate one packet will be guarantied to be sent from the writer and received by the reader; or, does it provide the guaranty with additional packets buffered?
    Attachments:
    LabVIEW Communication Features.pdf ‏61 KB

  • How to publish a directory with datasocket to download the content via internet?

    Hi,
    I have a VI, which makes a long scale measurement, thereby producing data in several subdirectories. I want to download the main directory, which comprises the data via internet, e. g. by ftp.
    Can I do this with datasocket? Do I have to set up a ftp-server or can the datasocket-server act as an ftp?
    Thanks for your help in advance.
    MB

    You can write to an existing FTP server with datasocket. I know you can write text files, but I am not sure if you can use other file types. All you need to do is specify the URL of the ftp server you want to write to with the desired file name. For example, if I wanted to post a text file to NIs incoming ftp server I would use the following URL: FTP://ftp.ni.com/incoming/text.text[text].
    You have to use the [text] extension to write to the file. Take a look at the attached screenshot. It will generate a sine wave, cast it to a string, write the file through datasocket, and then read in the same file and display it in a graph.
    Attachments:
    FTP_DATASOCKET.jpg ‏24 KB

  • OPC custome and automation I/F

    Hi all,
    Sure it's clear I'm just a beginner in OPC. I wanna know what are OPC custom and automation interfaces?
    Thanks... 

    Hi,
      for connecting to OPC, you can simply use Datasocket. If you're designing a larger system, then you might want to have a look at LabVIEW Datalogging and Supervisory Control, which prior to LabVIEW 8.0 runs with a tag engine to connect to the various external data sources, including OPC, and then you write your code to talk to the tag engine. To learn more about LabVIEW 8.0 and the DSC module have a look at the links from here : http://zone.ni.com/devzone/conceptd.nsf/webmain/D76C3788A0C4C5668625708B0072987C
    Here's the link to a search results page that will allow you to find out more about Datasocket and OPC connections.
    http://search.ni.com/nisearch/nisearchservlet?nistype=default&ddown=0&filter=%2Btaxonomy:top+%2B(met...
    (from ni.com, top right hand corner and type in "OPC datasocket" (without the quotes)
    Hope that helps
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

  • LabView and Ethernet I/O modules (from Advantech)

    I'm a LV beginner and I need to communicate via Ethernet with DAQ modules (ADAM-6000 series from Advantech). What is the best and easy way to communicate using Ethernet ? LV has built in VI's to do this ? I've read and heard a lot about DataSockets and OPC servers, it's necessary to go this way? I've LV 4.1 and 5.1, Need I to get LV 6i or 6.1 ? Should I acquire some toolkit for LV ?
    I'd appreciate your help.
    Paolo Santos
    Automation Engineer.

    Paolo,
    I am not a expert on the ADAM-6000 series from Advantech. But here are some of the options I think you have. Advantech most probably has a driver(dlls) for the modules. Once you configure your modules through a configuration utility, you can use the LabVIEW 'Call Library Function' to make direct calls to that driver and be able to communicate with the ADAM-6000. I think if you are a LV beginner, this could take quite some effort to figure-out the driver calls.
    If the modules communicate via TCP/IP, FTP or UDP, You can use the LabVIEW Internet toolkit to communicate with it.
    A better option could be to set up a OPC Server for the ADAM-6000 and use the simple datasocket client examples to communicate with it. A easy solution could be to get a N
    I distributed I/O hardware- FieldPoint, system(http://sine.ni.com/apps/we/nioc.vp?cid=1206​〈=US). With the FieldPoint driver installed you can select from the huge library of FieldPoint LabVIEW shipping examples and be able to get your application up and running in a very short time.
    Regards,
    Pravin

  • Interested in a LabView-Chat? (Datasocket)

    Hello,
    if someone needs a labview-chatprogramm then check the attached file.
    I made some tests with the datasocket and here is the result.
    Installatation:
    - Take two computers connected overLAN
    - Start the Datasocket-Server on one Computer
    - Change  the IP-Adress in the config-TAB in both Computers
    - Rename the "nicks" in the config-TAB in both Computers
    - Give "write-access" to the second computer in tht datasocket-server-manager for the item
    Any ideas how to set different colors in the history for each user?
    Attachments:
    LabChat.vi ‏35 KB
    screen.jpg ‏22 KB

    Celest1111 wrote:
    Or can you please re-direct me to any place that discuss about simple LabView Chat??
    What is the purpose of this execise? There are plenty of good chat programs available, so it seem silly to roll your own.
    I can see a purpose as a learning tool, for example if you simply want to get more familiar with LabVIEW programming and network communications in general.
    The LabVIEW help and NI.com resources are pretty good. So if you have a question abaout datasocket, You should be able to find plenty of resources. Where have you looked so far? Did you find something that needs more explanations?
    Here's a LabVIEW 2010 version of my above code. Warning: it is a simple refacturing of the existing code and I have not tested it. It simply demonstrates how to eliminate all local variables, duplicate diagram constants and unneeded sequence structures, all without changing the functionality from the old original program posted on the top of the thread.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LabChatMOD.vi ‏15 KB

  • Datasocket Server vs. Shared Variables

    Does anyone have any thoughts on what is better - Datasocket Server vs. Shared variables?  I have a table on my application that has text indicating application status, information, warning and debug messages and would like to view it remotley over a network.  The old way was to use the datasocket server and bind it to the other control.  Is the new shared variable engine more efficient?  These machines are at different sites.
    John

    Hi John,
    It definitely seems as if you want to gauge user experience on this issue, but since you've had no response I'll chime in and give the "National Instruments view" on the DataSocket/Shared Variable debate.
    Shared Variables were created to expand the functionality of DataSocket and simplify the programming style required to pass information between networked computers. We have extensive literature on this topic and the most pertinent is linked here.
    I hope some users will post to this forum to give you a less formed response than you get from me, but I am more than willing to answer more specifically if you have any more questions regarding this issue.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

Maybe you are looking for

  • How do I change the Serial Number in Logic Studio?

    Hi All, I used a friends copy of Logic Studio and the serial number to give Logic Studio a try, loved it, and bought it. However now I have my own serial number and would like to enter it into Logic. Logic, of course, has kept the first serial number

  • Quick Time Error 46-Easy Solution found

    I had the same Quicktime Error 46 that others have had. I tired every solution I could think of and none worked. I am using winxp home on my wife's laptop. Guess what actually worked? System Restore. In my case, Quicktime was working properly until t

  • Hierarchy problem in BCS

    Hi Experts, I am using hierarchys in BCS.some body has created "test" hirarchy in BCS.I want to know the details of who created  the test hirarchy.can some body help me to find out the details of the above. Thanks&Regards reddy

  • Clearing a customers account.

    Clearing a customers account.  Is there any affect from not performing a clearing of the customers account?  Can this cause a block in the billing or block in the sales order creation?

  • ISQLPLUS : Internet Explorer cannot display the webpage

    Hi, on 10g R2 on Win 2003 server when I (being logged as sysman) click on iSQLPLUS link on DB control, and give agreement to display in http and not https I receive : Internet Explorer cannot display the webpageisqlplus Windows service is running and