Labview: TCp Open Issue!

Hi Everyone,
    I'm working on a MODBUS routine for communication with one of our control modules. I'm using NI's Modbus library to initiate a connection, check the registers, etc then report the results back to a teststand seq for fruther analysis.
    Problem? I made a few minor adjustments to the library (just the main routine) because i only need to read the registers for now. However, when I conenct with the TCP Open Connection, nothing happens. Well, not completely true.. I sinffed the connection with Ethereal and I get the following errors...
1)
SENDING:
TCP: Src Port 2061, Dst Port: 502, Seq: 13, Ack: 10 , Len:12
Checksum: 02x282d [incorrect, should be 0xfd6b]
2)
RECEIVING:
Modbus/TCP:
-Modbus: Function 4: Read input registers. Exception: Illegal data address
exception code: Illegal data address (2).
I understand the second one and believe it's related to the first but ....?
Does anyone have any ideas or suggestions? I'd go into the TCP OPEN.vi if I could, but it wont let me, so...?
Thanks Again,
BK

Hi BK576,
Does this still give you problems if you don't make your modifications
to the MODBUS libraries? What changes were made? Could you possibly
submit an NI-Spy capture taken while seeing this error?
Regards,
Matt S.
LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.

Similar Messages

  • TCP Open Briefly hangs LabVIEW

    Hello LabVIEW forum! Long time no see. I have been away from LabVIEW doing other things but.... I'm back.
    Background:
    I am working on a project where I need to make a TCP connection to a Windows 7 machine. The Windows machine will intentionally reboot for each test. When it boots i need to make a TCP connection to a server that automatically starts on the Windows machine and send some commands. While it is booting, I try to connect, get an error, try again, etc until the connection is made.
    The problem:
    This machine name is not resolved by DNS or the hosts file. If I try to connect using a host name, and the host name cannot be resolved, LabVIEW will freeze for a few seconds. If I click the red abort button I get the not responding error. It will eventually recover and give me an error 54. The timeout is not relevant in this situation. It doesn't matter how long or how short I set it to, it always hangs LabVIEW for about three to five seconds. If I try to connect by IP number instead, then I don't see this problem. If the machine is off I just get a timeout error but LabVIEW doesn't freeze.
    I cannot post code but try this: Write a VI with an infinite while loop and an indicator connected to the i terminal and place a 100mS delay in it. Run that and notice that the number increments. Now create and run a second VI with the TCP open in it and use a machine name that does not exist. What I see is that the number in the first VI will quit incrementing. I am using LabVIEW 2014 32 bit on Windows 7 Ultimate 64 bit. First open a console and try to ping the non-existant name you are trying to connect to and verify that it doesn't print an ip number. Some Internet providers will resolve all non existant hostnames to an IP they own for their own gain. If that is the case then you will not be able to duplicate this bug.
    I have a workaround (put an entry in my hosts file) but I thought I would mention this possible bug. Plus it gives me an opportunity to say hi to all my old friends on my favorite fourm! (the list is long but you know who you are)
    =====================
    LabVIEW 2012
    Solved!
    Go to Solution.

    LabVIEW calls Winsock for all network operations. Most of the Winsock operations are synchronous. This is not a big problem for most of LabVIEW code as LabVIEW is multithreading and executes the nodes in whatever thread the current VI is at. However some functions need to access some global data space and are protected by some means. This can be a global mutex and sometimes it's also solved by forcing the node to always execute in the UI thread of LabVIEW which also executes the windows message loop and Winsock does hook into that message loop to do its own internal pseudo synchronous operation.
    The check for Adres to IP is something you can try. It may also lock up because of the internal Winsock hooking into the application message loop, but maybe it won't so that you can circumvent the problem. There is no way for an applciation using the normal Winsock API to avoid internal Winsock timeouts for synchronous functions, and the adress resolutino API does not really support asynchonous variants.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • TCP Open Connection and Error Code 1

    So, I have a client that is supposed to continuously try to connect to a server using TCP Open Connection.vi. When the connection is established, the loop is supposed to exit.
    psuedocode for the loop I have is as follows (similar code, LV 7.1, exhibiting the same problem is attached)
    while (error)
      attempt to open connection
    Pretty simple, right?
    I've had no issues with servers written in LabVIEW, but when attempting to integrate with a server that was written in C, it appeared that the client created multiple connections. I have been able to reproduce this problem by writing a server with Java. The C server was on a remote machine, the Java server on a local. Both see different numbers of additional connections (3 for C, 2 for Java).
    Looking at the error codes, I am getting a bunch of code 56 (timeout, expected) and the ocassional code 1 (unexpected). I have noticed that whenever I have this multiple connection problem, I show an error code 1 right before the valid connection attempt and loop exit. Is there someway that a connection is being established (or partially established), but labVIEW is still returning an error? Is there a better way to verify that a TCP connection was actually successful?
    Here is example output from the attached code, it shows the error codes generated
    56
    56
    56
    1
    56
    56
    56
    56
    56
    56
    56
    1
    56
    56
    56
    56
    56
    56
    56
    1
    Here is output from my Java code
    [2006-05-24 15:43:23.556] - Begin Listening for Connection Attempts
    [2006-05-24 15:43:23.587] - Accepting Connection
    [2006-05-24 15:43:23.603] - Begin Listening for Connection Attempts
    [2006-05-24 15:43:23.603] - Accepting Connection
    Running ServerNIOConnection Thread
    [2006-05-24 15:43:23.603] - Begin Listening for Connection Attempts
    Running ServerNIOConnection Thread
    Thanks,
    Martin
    Message Edited by mmathis2000 on 05-24-2006 05:50 PM
    Attachments:
    Sample Client.vi ‏21 KB

    Hello,
    I’m a little curious why you are setting up your client like
    this.  If it is your objective to just
    have the client wait until a connection is made, why not just have the TCP
    connect VI have timeout value of ‘-1’ meaning “do not timeout”.  This will allow the built-in TCP event
    structure to listen for connections and ‘wake up’ your program when a
    connection is established.  I say this,
    because the error messages seem to be dependant on the timeout values.  For example, wire in 1ms to the timeout and
    see how the messages differ in timeouts as opposed to wiring in “2000” for the
    timeout value.  This is because the
    Connect VI attempts a connection and waits only the specified timeout before
    abandoning that attempt and continuing with another attempt.  I’m betting in your case connecting to the
    server takes longer than your timeout value, so the connection is initiated by
    your LV client, the handshaking takes place, your server indicates that a
    connection is being made, and sometime during this process your timeout expires
    and LV tries the process again thus you see the multiple connections.  Go ahead and try this as an experiment – take
    your VI, and instead of using ‘localhost’ use the IP address of your favorite
    website and change the remote port to port 80. 
    Change the timeout to -1 and wait for the connection, then change the timeout
    to 1 and see all the timeout errors given.
    Hopefully this answers your question, please let me know if
    you have any additional questions or if this is inaccurate/unclear.
    Travis M
    LabVIEW R&D
    National Instruments

  • How to use WAN IP with port number in TCP Open Connection ?

    I have a code to write / read a WiFi device server that gets DIO / AI data through a serial port. See attachment.
    The device driver has a static IP of 192.168.1.10 and port 30704 for data stream. I have a router which links my laptop and this device driver in a LAN and all is fine.
    But now I want to access my device driver through the internet. For this I already have done a port forwarding in my router to direct incoming requests on 30704 port to my device driver.
    The issue : I cannot reach my device driver when I enter the WAN side IP of my router like 52.23.45.131 and the Port as 30704  in the TCP Open connection.
    Any suggestions ?
    Thanks 
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.
    Attachments:
    Remote_Logger.vi ‏32 KB

    Hello,
    without looking at your vi:
    Did you try to reach your device from an external Computer?
    Because NAT Translation cant be done (by most routers) if you try to reach yourself from the inside.
    I am correct that the device created a virtual Networkcard on your computer at which you can communicate locally, right?
    Did you try to use another computer in your Network, to reach your computer and the attached device?
    If it is not possible, try to enable Routing at your computer.
    If it is possible, your router is not forwarding (or you answered at with "no" at the first question or both).
    If you are using an external computer and the networkinternal connection from another PC is working and you are 100% sure the router is set up correctly, try to disable all local firewalls and test again. (if it works you need to setup a proper fwrule).
    Regards
    Rene

  • Is there a way to know which Ethernet port will be used when running TCP Open?

    Hello.
    I have several Ethernet ports in my computer, and I am trying to write a VI that sends data from one port to the other (for debugging an issue).  I was planning on using the TCP Open and other TCP VIs, but the TCP Open does not seem to have an input to tell it which local Ethernet port I want to use.
    So, is it possible to specify which Ethernet port you want your TCP connection to be open on?  How about UDP?
    Thanks,
    AlejandroZ

    The TCP Open does have inputs for specifying both local and remote ports.
    Message Edited by Dennis Knutson on 08-23-2007 09:52 AM
    Attachments:
    TCP Open.PNG ‏11 KB

  • Using SMTP I can not use a mail server with more than 13 characters. I get an error from TCP open

    I have no trouble sending an email if the mail server name is less than 13 characters long. I get an error 54 from TCP open when it exceeds that length. How do I get around this?

    Don't know what to say, I just tried the SMTP email VI I have with an 18-character mail server address and everything worked fine. The error 54 means that the address is ill-formed.
    The only thing I would suggest is trace the mail-server address down through the hierarchy and make sure nothing is done to modify it. Also try putting a probe on the wire going into the TCP open function and make sure the string you see there is the same one you are using. Finally, change the formatting of the control taking the address into the subvi that contains the TCP open function (SMTP Open Session.vi)to show the slash codes and make sure some invisible characters aren't getting added along the way.
    As a last resort save the vi in 6.0 format and send it to me and I'll
    try it on my system--maybe there's something screwy going on with your computer...
    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

  • Storing labview TCP connection in TestStand object reference

    I have a LabVIEW routine (GetFileGlobal) that uses the TestStand SequenceContext->FileGlobals to do a lookupString and determine the GetType if the string 'Exists'.  I have a LabVIEW case statement that captures values of '1' for GetValString, '2' for GetValBoolean, and '3' for GetValNumber.  I have a LabVIEW TCP connection that gets opened that we need to store in TestStand in a FileGlobal.  What type is necessary in TestStand to store a TCP Conn?  AND, given the (tbd) type in TestStand, what is the value I would need in my case statement to capture this new (tbd) type coming out of the GetType?  

    I've asked this on another thread, but I'm just not understanding the exact implementation.  In TestStand, the LabVIEW IO Controls type is made up of a DeviceName and a SessionNumber, but in LabVIEW I have a TCP Network Connection.  I have routines that let me Get/Set TestStand File Globals if they are Boolean, String, or Number.  Now, if I use LabVIEW IO Controls in TestStand, what is the exact way I stuff a TCP Network Connection in there.  I've attached a VI that I use to GET the FileGlobal value from TS.  I need to grow it to allow me to get the TCP connection (i.e. LabVIEW IO Controls), but I'm not sure how to do that.  The types are messing me up.  Also, I'm not sure what the 'GetType' wants to see
    Attachments:
    FTW_ATE_UTIL_GetFileGlobal.vi ‏25 KB

  • Tcp open connection problem while parallel tcp communicat​ion

    I have a problem with TCP Open connection while running another TCP transfer.
    While I run the Simple Data Client/Server example (..NI\LabVIEW 2010\examples\comm\TCP.llb) I would like to open another TCP connection according this simple VI attached. This runs on another port than the running Client/Server example. When the address of the PC to be connected to, is known to the network (IP/Name) all is fine, when the address is a name unknown to the network, than a significant delay in the datatransfer of the client/server example occures. Hope that anybody can reproduce/explain this behaviour.
    Network setup here is Gigabit ethernet/ DHCP / Windows XP Prof. SP3/ LV 2010 / LV 8.6.1
    Jörn
    Attachments:
    TCP_Open_blockingproblem.vi ‏16 KB

    I really appreciate your comments,
    to make sure that we do see the same effects let me exactly explain what I see: I open the example vi's : Data Client/Server example (..NI\LabVIEW 2010\examples\comm\TCP.llb. You can open it localy that means on one PC or open one  on another PC. To make it simple for the first try open it localy and run both vi's according the example instructions. On the Data Client.vi I see now the samples updating many times per second (should be every 25 ms, because the server produces these in this intervall). All is like expected. Now open the TCP_Open_blockingproblem.vi from above and let it run unmodified (except you have an PC named 'DataServer0'). What I see now in the Data Client.vi : The samples update came nearly to an halt (this is why I called it 'blocking'). Updates only every 6 seconds (here in my network setup). Now stop the TCP_Open_blockingproblem.vi. The DataClient.vi is running on the same speed as before. Now modify the 'DataServer0' to a pc name existing in your network and start again. This time the sample speed is not degraded. Can you confirm this behaviour ?.
    I did recognise the effect for the first time while I desigend an appliaction  based on the STM library and posted the effects I saw, here : http://forums.ni.com/t5/Components/Simple-TCP-Mess​aging-STM/td-p/583438/page/5. Like Christian Loew supposed there is a bunch of code around. It is a multi tier application receiving TCP traffic on some ports and distributing on others. So I decided to isolate the problem from STM and my own code and came to the simplest code which I thought it was possible where the problem still occures which I described above.
    Your suggestion to lookup the names once in the beginning of the application is a possible way, but I must say with the experience now I am still very uncertain of more unexpected future side effects during lookup, especially on network setups at customersites where I have no direct access. So I decided to give an UDP registration mechanism a try, like it is realised in the STM Examples of HostReceiver.vi and Target Sender.vi.
    Thanks for following so far,
    Jörn

  • DirectAccess - TCP open port not reachable

    Hello,
    I did a little experiment with my DirectAccess connectivity.
    I have a laptop with DirectAccess connectivity enabled with my domain username.
    I logged in to my laptop with my local administrator account. Thus, DirectAccess mounts the IPSec ESP tunnel infrastructure and it is possible to querry DNS requests to my Intranet (even if I'm not authenticated with my domain account).
    I realize I was able to netcat to the web servers (and more generally, to use netcat to connect to any TCP opened ports on the intranet). Here there are two things I do not understand.
    - I know there are two DA servers in a DMZ. I guess the fact I am able to netcat where I want on the Intranet is due to a lack of firewalling. But is it, or is it just a consequence of the way DA works?
    - Then, when seeing I could netcat to open ports, I tried to connect to the web server with my browser, but the connection timeout. I thought it was strange. I should mention that when querrying the web server with a GET request in netcat, I only receives
    HTTP headers qith a body length of 0. However, I do not understand why the browser querry timeout, and not the netcat one.
    Thank you!

    Hi
    When you log on your laptop with your local administrator account, this account cannot be used for the user IPSEC tunnel. So you only have the IPSEC infrastructure tunnel established by your laptop. With this tunnel, you have access to all ressources declared
    as allowed in the infrastructure tunnel.
    BenoitS - Simple by Design http://danstoncloud.com/blogs/simplebydesign/default.aspx

  • Close a notepad window in labview after opening it with system exec

    Is there a way to close a notepad window within Labview after opening the window using the System Exec function?
    Also can Labview send characters to Notepad so they show up in its window?

    You can send a quit message to another window by using one of the VIs in a collection of windows interaction VIs called winutil32 (or something similar), but you will have to know the window name. Try searching for it on this site.
    You could probably also use the windows PostMessage function to send characters to another window, but that would require learning how to work with DLLs in LV, reading up on the function at the MSDN site and implementing it. Another, more simple but less secure, way is to use the windows Keybd_Event function to simulate keyboard clicks. If the notepad window has the focus, it will receive those clicks. Try searching this site or google for things like "Keybd_Event LabVIEW" or "simulate keyboard".
    Try to take over the world!

  • Why a VI has a broken arrow when I open it when labview is open but becomes executable when it is opened by double clicking

    I have a VI with some subVIs from a dynamic link library. When I open the VI using "open" or "open VI" in labVIEW, the VI is broken. In the error list,it saids one or all the subVIs from the dynamic link library are not executable. However, if I exit labview and open the same VI by double clicking it, it becomes executable without any change being made. Sometimes I can fix the broken arrow by configuring the "call library function node" in the subVI and saving it. But when I open the VI again, the same problem and error message appear. I am using labVIEW 6.1 for the top level VI and those subVIs from the dynamic link library could be developed in a different version of labVIEW. Is this the cause of the problem? Another possible reason I can think of is that somebody installed another application developed in labVIEW on the same computer. Is it possible that some settings were modified during the installation that cause this problem to occur? I am suspecting this because I first notice this problem after the installation of the other application.

    Since the problem started ocurring after installing another application, I would suspect something with that last installation. Without knowing more about the installations, I would not be able to help much. Did the other installation perhaps install another DLL of the same name? Try uninstalling the last app to see if the problem goes away.
    - tbob
    Inventor of the WORM Global

  • Network error : Connection cannot found : TCP Open in J2ME

    Hi all,
    I am using Wireless Toolkit 2.5, when the application tries to connect IIS server, it won't work. the error is:
    IOException javax.microedition.io.ConnectionNotFoundException: TCP open
    javax.microedition.io.ConnectionNotFoundException: TCP open
         at com.sun.midp.io.j2me.socket.Protocol.connect(+99)
         at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+52)
         at com.sun.midp.io.j2me.socket.Protocol.openPrim(+108)
         at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+14)
         at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+8)
         at com.sun.midp.io.j2me.http.Protocol.connect(+73)
         at com.sun.midp.io.j2me.http.Protocol.streamConnect(+57)
         at com.sun.midp.io.j2me.http.Protocol.startRequest(+12)
         at com.sun.midp.io.j2me.http.Protocol.sendRequest(+38)
         at com.sun.midp.io.j2me.http.Protocol.sendRequest(+6)
         at com.sun.midp.io.j2me.http.Protocol.closeOutputStream(+4)
         at com.sun.midp.io.BaseOutputStream.close(+14)
         at HttpInputOutputStreamNet.getGrade(+190)
         at HttpInputOutputStreamNet.startApp(+8)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    but, file in localhost and ip address of the server works well, that is url with ip address for the server works but the host name not works. The url's www.something.com and http://www.javacourses.com/hello.txt works fine.
    May anybody help this problem

    Jaime,
    Hay un ejemplo que tenemos en el web que te puede servir. Se llama Reconnect TCP Connection y creo que te puede ayudar en este caso.
    Saludos,
    Nestor S.
    Nestor
    National Instruments

  • Javax.microedition.io.ConnectionNotFoundException: TCP open

    i am running my application this connecting to my local servers's web pages but when i try to connect to other internet servers then i am getting following error plz help me in solving this problem.....
    javax.microedition.io.ConnectionNotFoundException: TCP open
    at com.sun.midp.io.j2me.socket.Protocol.connect(+99)
    at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+52)
    at com.sun.midp.io.j2me.socket.Protocol.openPrim(+108)
    at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+14)
    at com.sun.midp.io.ConnectionBaseAdapter.openPrim(+8)
    at com.sun.midp.io.j2me.http.Protocol.connect(+73)
    at com.sun.midp.io.j2me.http.Protocol.streamConnect(+57)
    at com.sun.midp.io.j2me.http.Protocol.startRequest(+12)
    at com.sun.midp.io.j2me.http.Protocol.sendRequest(+38)
    Uncaught exception java/lang/NullPointerException.
    at com.sun.midp.io.j2me.http.Protocol.sendRequest(+6)
    at com.sun.midp.io.j2me.http.Protocol.getResponseCode(+8)
    at QuoteRetriever.run(+43)

    s there any embeded database for j2me?RMS is the database for j2me.
    You can either use RMS or Files to store your application data. Please note Not all devices support File system access and files written by your application can also be seen by user while he explores the file system.
    RMS is supported by all MIDP devices. RMS data cannot be seen in file system. You can set access setting while creating the recordstore.
    As you have solved your problem, please mark this question as answered.
    Atul

  • Cisco E900 ports 1990/tcp and 5916/tcp open on the LAN. Cannot close them.

    Hello,
    I just bought a Cisco Linksys E900 wireless router. Can someone explain to me why  the router (192.168.1.1 on my case) has ports 1990/tcp and 5916/tcp open on the LAN?? I cannot find a way to close those ports.
    Just do a simple:
    telnet 192.168.1.1 1990
    or
    telnet 192.168.1.1 5916
    and you'll see those ports are open.
    1990/tcp = Cisco STUN Priority 1 port
    5916/tcp = I have no idea
    Every client on the LAN (wired and wireless) can connect to those ports on the router. I do not want that to happen. It is unncessary and it is just not secure. I only want the router to have port 443 open on the LAN for the web mgmt interface. I do not want any other unncessary port open.
    It would be great to have a response from Cisco directly.
    Thank you for your time.

    JohnT66 wrote:
    Thank you for your response.
    The router is already updated to the latest firmware (1.0.04 Build 1).
    I had to do the update as soon as I opened the box because the default firmware had an incredible serious bug: after setting up the web management interface on the LAN to work over SSL, it was impossible to access the interface because of an SSL bug in the router. The bug is in the release notes of the firmware... that alone says a lot about the very very poor quality of this router.. you can't have that kind of bug in a finished product....
    I was able to close port 1990/tcp by disabling WPS in the router, although doing so was pure luck since the router's UI is terrible..
    5916/tcp is still open.. since I was able to close 1990/tcp I don't think this is a defective router.. I cannot return a router to the store just because it leaves a port open, the store, sadly, will not take it back... so please Cisco, can you help with this? this product is faulty, it doesn't work as expected, it's your responsability.. please help
    Reset the router manually then reconfigure the settings.

  • How to specify 2nd network card to TCP open and write?

    TCP-Open does not have an option to choose which network card to use. It only has an open to connection but not an open from connection to enter. Is there anyway to select the second network card instead of letting the computer to choose?

    pwrdesoto wrote:
    Only the TCP-Listen allows the user to choose which network adapter to listen. The TCP-Open is require to open an connection to write to and it only has an input on where to connect to but not which network adapter to connect from.
    tst is completely right. If you have two network cards they usually have different subnets that should not overlap. If the desired target adress belongs to one of those subnets the TCP/IP routing will automatically select the correct network card to bind the connection to. If you use an address outside of those subnets the default gateway will be selected.
    And according to a Microsoft knowledgebase article it is a very bad idea to have more than one default gateway defined in the entire setup. If you do that the default gateway of the default (primary adapter) should be selected automatically but the routing can get really weird sometimes.
    If this is not enough for your routing requirements you will have to manipulate the routing tables manually (and no it is no pretty business to do so). Look  at http://support.microsoft.com/kb/140859 for a starting point about routing table manipulations under Windows NT (still applicable to XP) based systems.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Folders and images change when hard drive disconnected

    I have no problem importing images. From CD's, when the CD is removed the file folder and images stay there with reference to the original location. However, I have several hard drives and when I import files and folders from one of them and then dis

  • CS6 Bridge web gallery - HTML Gallery template problem

    In CS6 Bridge, a web gallery created with the HTML Gallery template puts the images in a directory with a path of content\bin\images. This prevents the images from being served from IIS - the bin directory is by default a "Hidden segment". There is n

  • Output Preview Changes Colors

    In our softproofing setup, we have our press profile set up as the default CMYK profile in Acrobat 9. However, when we open the Output Preview window with the same profile set under Simulation Profile, the appearance of the color changes (some colors

  • Firefox 3.6.3 is not supported by the Google Font API

    I have Firefox 3.6.3 on my Macbook, but is only detected as 3.0.1on this form. When I link to the Google font website, it says, "We're sorry, but your browser is not supported by the Google Font API. To browse the fonts in the Google font directory p

  • Use Mac to download/burn security patches for windows xp machine?

    Hi, I'm trying to migrate from windows xp to Mac mini. The xp machine is infected with something nasty (phones home whenever I connect), so I won't take it online, but want to get latest security updates. Can I use the Mac to do this? i.e., if I down