How to use shared variables to address multiple Watlow controller​s on the same COM port

Hello,
I am trying to use LabVIEW 2010 to control 4 Watlow temperature controllers on one COM port. 3 are Model 96 and 1 is an EZ zone controller. Each controller has a unique modbus address, and I am trying to read from and write to individual registers (such as closed loop setpoint) using shared variables. I am getting return data when reading (although the data appears to be invalid), but am unable to change the value in the register by writing. How can I be sure that the Modbus server is sending commands to the correct controller?
Chuck
Solved!
Go to Solution.

Peter,
Thanks for the reply. I have actually solved that problem. I realized that the Modbus server address has to be the same as the controller's Modbus address.
I have, however, run into another problem. Perhaps you could help me with that. I have a system with 4 Watlow controllers, 3 are series 96 controllers, one is PID only and 2 are ramping. The 4th controller is an EZ zone. I am using RS485 for communications and the controllers are all wired in parallel for communications and power.
I have set up 2 Modbus servers for 2 of the controllers.
This is the first I have ever worked with Modbus based communications. I have successfully programmed using the Modbus read/write VIs, and am wanting to move to shared variables. My questions right now revolve around addressing, Modbus I/O servers and COM ports. Specifically, at this point, I know the addresses need to match up between the server and the slave device (Watlow controller in my case), how many servers can I create and use on one COM port? If the number is limited, is there a way I can specify an address that I want the server to talk to? Will the broadcast mode work to request data values from the controllers?
I'd appreciate any information you can help me with, or if you could point me to some sort of concise 'How-To' for Modbus communication.
Thanks.
Chuck

Similar Messages

  • How to use shared variables?

    Hello..
            Can anybody please guide me in using shared variables... I'm learning LabVIEW 8.5.... But did not understand how to use shared variables... I tried to read web pages regarding shared variables but got confused.... So anyone can please help me...?
             Thanks for any help from you...

    You will have to give us the whole picture. What is your client computer; a PAC, desktop etc? What are you running on the client computer; a VI or an executable? Where are you going to deploy your library? On the host machine or the client machine?
    If I assume that you are running a VI on the client machine and are depolying the library on the host, all you have to do is to create another shared variable and bind it to the variable on the host machine. You can do this by checking the Bind to Source option when creating the variable and browsing to the network item in options. Be sure to have the library deployed on the host side before you attempt to do this otherwise you won't be able to find the variable.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • HT1539 How can a digital copy be used in a household with multiple apple ids, synced on the same computer?

    How can a digital copy be used in a household with multiple apple ids, synced on the same computer?  I want to put a digital copy on my device, and on my wife's device.
    Please help.

    you're welcome.
    actually, unless you take an extra step, the first opened swf will close.  if you want the 2nd to close, the initial receiving lc will send a message to sender that causes the sender to close.

  • How to use shared variables with native c programs

    Hello
    What is the way to use shared variables with native c programs?
    I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
    Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
    Thanks in Advance

    Hi user42,
    with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
    In order to do this you need to have and DataSocket 4.3 or higher installed.
    Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
    http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
    With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
    Datasocket with LabWindows/CVI and LabVIEW Real-Time:
    http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
    Daniel
    NIG

  • How to use shared variables to measure analog input

    Dear All,
    I am using Real time remote system. I am using PXI-6259 card, PXI-8184RT controller and PXI-1031 Chassis.
    I want to use shared variable to measure and analog Input(voltage) from
    an analog input Channel.  I tried  attaching it  with the physical
    channel using the bind to source option but it idoes not seem to work,
    can any one give me any suggestions?
    Screen shot  of this is available.
    I tried using the Acq and graph example and deployed it to the RT but
    the Sine wave I input in the measurement channel  becomes highly
    distorted when I see it in the host.vi, there is also a Screen shot of
    this also. Is there any other option.
    What am I doing wrong? all suggestion are highly welcome.
    Thank you.
    Sincerely,
    Munir Afzal Bhatti.
    Attachments:
    SV2.jpg ‏2305 KB
    SV3.jpg ‏2305 KB

    You will have to give us the whole picture. What is your client computer; a PAC, desktop etc? What are you running on the client computer; a VI or an executable? Where are you going to deploy your library? On the host machine or the client machine?
    If I assume that you are running a VI on the client machine and are depolying the library on the host, all you have to do is to create another shared variable and bind it to the variable on the host machine. You can do this by checking the Bind to Source option when creating the variable and browsing to the network item in options. Be sure to have the library deployed on the host side before you attempt to do this otherwise you won't be able to find the variable.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to use incremental variable in addressing nested objects

    I have a for statement intended to load images from an
    external array and insert them into the content holders.
    for (i=0; i<15; i++){
    products.prod+i.circle.pic.contentPath = imagearray
    If I replace the +i with a number between 0-14, it works
    fine. What is the proper trick to append the i variable after
    'prod'?
    I have tried many things with no luck.
    Thank you.

    See attached.

  • Communicating Between Multiple LabVIEW Executables on different computer using Shared Variables

    hi,
    I need to develop some executables which will be launched on different computer of a LAN. Some DATA are common. I need to share the data using shared variables.
    I usually used LabVIEW so I 'm familiar with shared variables but in this case, the RT target is a part of my
    project.
    I do I need to procceed in my case?
    thanks

    Ok but it's not my configuration and I haven't found my answer in the tutorial.
    You speak of a case where there is a computer and a RT target under the same LabView project. As I said earlier, I often use labview RT and shared variable between computer and RT target. But I assume here it's different.
    My question is : how do you acces to the SVE from 3 computers (without any RT target)? 
    1. If I create 3 labview projects using the same Shared Variable, do I need to use the same .lvlib on each project?
    2. Is it possible? 
    3. How can I configure where the SVE should be? When I use a RT target, It only depends where I put my Lvlib. But here there is 3 projects. 
    James
    Attachments:
    Sans titre.JPG ‏9 KB

  • How to read shared variables inside event structure ?

    Hi,
    I have a problem that my shared variables do not update inside event structure. The program(s) I am trying to get working is seen in the attached screenshot. It works as follows:
    0. I start the vi that is unsquared.
    1. I write a string to a shared variable using vi in red square. I make sure that its updated using write-wait-read.
    2. I run the other vi (blue square), this changes the boolean shared variable.
    The unsquared vi has been running the whole time, it has event structure bind to boolean shared variable change (the one in blue vi). After I have runned the blue vi, the unsquared vi should change the indicator values to match the ones in red vi. However I have to start the blue vi multiple times to get it to change, sometimes even 6 times.
    Also, when I change the value in red vi to a third value and start blue vi multiple times, the unsquared vi shows all the variables. I.e. I put "cat" to red then start red, put "mouse" to red then start red,... and then start clicking blue... Unsqured shows cat, mouse,..., dog (dog is the default).
    How can I force the shared variable to update inside event sructure. I want the current value of the variable, not some historical values.
    Attachments:
    Screenshot-5.png ‏108 KB

    Found the buffering... disabling it solved the problem... thanks.
    FYI, there is another solution that I just found out... attached. Adding timeout to the event structure and the variable read outside the event structure... This makes the shared variable strings (one that is read outside and the otherone that is read inside) different.
    Could someone explain why the variables are in different state even if they are used in the same place and looped with 10ms intervals?
    Juha
    Attachments:
    Screenshot-6.png ‏110 KB

  • Upgrade to 8.5.1 on all computers using shared variables?

    Hello,
    We are currently using DSC 8.5 and hosting the shared variable engine on one 'server' computer with other computers subscribing to network shared variables.  Some of the computers are Windows XP and others are RT.
    When we upgrade to DSC 8.5.1 can we just upgrade the 'server' computer and leave all other computers at 8.5 or do we need to upgrade all systems to 8.5.1 at the same time?  Will computers running 8.5 be able to read/write network shared variables hosted on the DSC 8.5.1 system?  Is such a progressive upgrade not advised?  Thank you in advance.
       - Chris White
         ThinkG Consulting LLC

    Hi Chris,
    The variables pass through the Shared Variable Engine on your server before they are read by other subscribers. Therefore, you do not have to upgrade the DSC on all your subscribers. I hope that answers your question. For further reference on how network pulished shared variables operate as well as the role of the SVE, please refer to this link.
    Ipshita C.
    National Instruments
    Applications Engineer

  • About the performance of using shared variables

    Hi
     My system has almost 200 I/O points,I want to the host communicates with PLC using OPC(I had create a OPC I/O Server).
    If I use shared variables bind to OPC data items, there must be almost 200 shared variables.
    And my puzzle is that what's the performance of using these shared variables,will they eat up memory and processor?
    Another question is that if an shared variable will be time-lapse(i.e.,if an OPC data item value change feedback to  program block with 0 delay or not),if so ,then how many millseconds it will delaies? 

    here is a paper about the performance of shared variables.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Using Shared Variables and Initialize Front Panel Binding (to PSP)

    Hi,
    I use LV DSC RT 8.2.1
    I have a Vacuum System That includes signals from - Pumps failure, Valves status, Vacuum gauge, start Pump ...
    Each signal is read by a FieldPoint. 
    All the relevant FieldPoint Channels are read by the Server (a computer in the Ethernet Network) and published to the network in the form of Shared Variables.
    I have a client VI that is reading the Shared Variables published by the Server using Front Panel Binding.
    Problem : 
    Some of the Bindings are in the mode 'Write &Read' and that causes some initialization problems.
    For example - Valve #1 is Open, and then a User start running the Client VI, (the Valve #1 Status mode is 'Write & Read")
                           if in the VI the status of Valve #1 is closed (before running it) then the Valve status is changing to Closed.
    I want the Client VI to first read the Physical status of the instrument and then to change the Value if the User changes it.
    But that's seems to be a problem when using Front Panel Binding... (is it?)
    I know I can Deploy a lvlib in the Client Side and Item Bind to the Shared Variables or Use DataSocket.
    (Is DataSocket is a Reliable method when connecting to Shared Variables? What are the disadvantages when using DataSocket?) 
    What is recommended by those of you that are experienced or by NI ?
    Sincerely Yours,
    Amitai Abramson.

    Amitai Abramson,
    Hello and thanks for using the NI Forums.
    I'm glad that you've read the Using the LabVIEW Shared Variable Tutorial on our website. Check out these other resources:
    Network Variable Technical Overview
    Troubleshooting Network-Published Shared Variables
    Why Do I See Unexpected Value Change Events for Shared Variables Using LabVIEW DSC?
    All You Need to Know About Shared Variables
    Creating a Value Change Event for Shared Variables
    Alternative Method for Using Shared Variables Between Systems in LabVIEW 8.x
    What Is The Difference Between Using Shared Variables And DataSocket VIs To Access OPC Tags?
    The issue that you are seeing by having "Write & Read" bound items on both the server and client side is essentially a race condition, you don't know which one is being read/written at what time. To resolve this issue I would take a look at some of the documents below.
    Using a Local, Global, or Shared Variable in Parallel Loops Can Cause Race Conditions
    Using Local and Global Variables Carefully
    Tutorial: Local Variable, Global Variable, and Race Conditions
    Locking a Shared Resource or Variable in LabVIEW Using Semaphores
    You mentioned not wanting to have two sets of shared variables (one on each side), but this is a great method to resovle this issue, that, or you can develope some sort of hand shaking to prevent these race conditions.
    I would suggest that in the future when using these forums you try to ask only one question per thread and make it more concise. It's hard to tackle multiple questions and such broad questions as "I want to know all the ways that I can connect to Shared Variables, and I want to know the advantages and disadvantages." I suggest this because we want you to get your questions answered and more concise questions will result in quicker and better answers. 
    Message Edited by Ben S on 10-01-2009 06:05 PM
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

  • Coercion problem when using Shared Variable

    I have a curious coercion problem when using Shared Variables.  I want to share the state of a State Machine, which is an enum saved as a control (typedef) called TYPE State (see attached).  I create a shared variable called State and define it as a Custom Control, using the just-mentioned typedef.  So far, so good.  I've attached three simple VIs -- the first one, Init State, simply wires a constant to the input of the Shared Variable to initialize it -- the wired constant is, of course, defined by the typedef.  However, the Get State and Set State, meant to wire an indicator (for reading the state) or control (for setting it), develop coercion dots when wired into the Shared Variable.  Why?  How do I get rid of the dot?  [I suppose I could abandon my typedef and custom control, but the beauty of typedefs and custom controls is that it "enforces" rules, lets you use enums for clarity, keeps the code "honest", etc. -- I'd hate to give that up just to get rid of a dot!].
    On a related note, the code seems to work.  This is much too simplistic to do anything, but if you open Set State and Get State, set the state to anything, run it (it immediately stops, of course), then run Get State, you'll see the chosen state appear in the indicator.  So it does appear to work.  The "error" (coercion dot) may, I suppose, be a "bug" in Labview because it can't figure out the mapping of the (very simple!) Custom Control, but if so, I hope it gets fixed quickly!
    Bob Schor
    Attachments:
    Coercion Problem1.zip ‏38 KB

    Hello Bob,
    I am also seeing this behavior, I will escalate this question to our LabVIEW developers and post again here no later than next Tuesday, November 27th as National Instruments will be closed for the remainder of this week.
    If this issue does turn into a product suggestion, I would suspect the workaround would to live with the coersion dot for the time being.
    Enjoy the holiday
    Regards,
    Erik J.
    Applications Engineer
    National Instruments

  • Use shared variables with FPGA device on Host PC

    Hi all I am having a frustrating problem. I am trying to use shared
    variables linked to a cRIO 9012. The shared variables were created and
    then written to in a RT vi. is there any way I can assign locations to
    these not within a RT vi. I altimately need to run the Host vi on a
    TPC-2512 touch panel computer and I can't run a RT application on that. I
    just need the variables to update without the RT vi running and I can't
    figure out how to do that, if its even possible. Here is what I have so
    far. Thank you in advance for your help.
    Attachments:
    PumpMonitoringDevice.zip ‏2083 KB

    Adam:
    You may be able to use arrays to speed up your program, but bear in mind that the TPC is pretty much guaranteed to be slower than your computer (as it's likely to have lower system specs).
    You'll want to use the array manipulation functions to combine and retrieve your data (most useful will likely be "Build Array" and "Index Array," see context/LabVIEW help for more details). Once you have the data in an array, you can likely pass it through a shared variable configured for an array datatype.
    I'm not sure if/how much of a speed boost it will give you, but I think it's definitely worth trying. If you're not sure about the speed, try simply cutting your variable count in half and see what kind of speed increase you get with the same amount of code but fewer variable values being transmitted through your network connection.
    Good luck!
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • Shared Variables, Scan Engine & Multiple Targets

    I am seeking some general advice about the structure of my LabVIEW project.
    The project consists of a laptop with LabVIEW, and a joystick connected, and a CompactRIO connected via ethernet. I had been running the cRIO in FPGA Interface mode, however a change in some things caused the project to have to be shifted to scan mode.
    As of now, the code on the laptop updates shared variables on the cRIO, and reads from shared variables on the cRIO for monitoring. I want the shared variables hosted on the cRIO because it will also need to operate without the laptop connected. Before switching the cRIO to scan mode, I found that I had to first run the laptop code, and then run the cRIO code, or the shared variables would not communicate properly. Now that I have switched to scan mode, I have to run the cRIO code first, and even then the shared vars do not communicate properly for more than a few seconds, and are much laggier.
    My ideal project solution is a system that can run with or
    without the laptop connected, and obviously not having all these shared
    variable issues. I would like to autostart the code on the cRIO, and
    have the user run the laptop code if necessary, but in the past this did
    not seem to work with the shared variables.
    I am really confused about why this is happening. Hopefully I have explained my problem well enough. I don't really want to post the entire project on here, but I can email it to people if they are willing to take a look at it. Thank you for taking the time to read this.
    I am running LabVIEW 2010 SP1 with the Real-time, FPGA, DSC, and Robotics modules. I have the Feb '11 driver set and NI-RIO 3.6.0 installed and all completed updated on my RT cRIO.
    Solved!
    Go to Solution.

    I do this type of stuff all the time...
    Move all your NSV libraries to the cRIO.  From the project you must deploy to the cRIO and from then on they are persistant until you reformat.
    From your windows HMI app, you can place static NSV tags on the block diagram or use the dynamic SV API to R/W.  Also you can bind HMI controls and
    indicators directly to cRIO NSV's (This is what I do)  Also I create a 'mirror' library in the PC HMI that is bound to the cRIO library.  This library has DSC Citadel
    data logging enable and will automatically save historical traces of all my important data - very nice.  PC hosted libraries can be set to autodeploy in the app build. 
    also the project has a autodeploy option for the Development Environment which I normally turn off.  If you have PC to cRIO binding setup then you need to be cautious
    about any sort of autodeployment since it will potentially force the cRIO app to stop when you deploy.  To get around this, you can use PSP binding (IP address rather than project
    process name) and use the DSC deploy library vi's in your HMI app.  Once you are using the scan engine you can use the DSM (Distributed System Manager) app to view, proble and
    chart all of you IOV and NSV's on your network.

Maybe you are looking for

  • Update tasks - Transfer Order creation.

    I have an issue in our production environment where in some situations a Transfer Order (TO) is created with missing storage handling unit information.  This only happens intermittently, and when the TO is cancelled and re-created, it is created with

  • Workaround good/bad practice or does it not matter...??

    Hi, I have a project that requires other shared actions to hide./show something and was wanting a quick workaround for Hide 1 show 9 so I did as follows..(bear in mind I am using CP7 not 8) I copied my hide1 show 20 slide from another project, which

  • IMac slowed to unusable. Steps to diagnose?

    Symptoms: Long boot time. Keystrokes buffered for many words when typing. Long appliactaion startup. Spinning beachball a lot of the time. Actions to date: Freed up drive space. Added 8 Gigs Ram. Brought to genius bar for testing. Set up new user acc

  • Multiple notification against single inspection lot (03 inspection type)

    Dear friends While recording the defects multiple times against single inspection lot (03type) , all the defects are added in single notification, but my client requirement is they want different notification.  if any body knows please tell me. Note

  • AS2 - Manipulating & Displaying Remote Images

    Hi - I've been handed a few Flash files written in CS4, but in ActionScript 2.  I know enough ActionScript to be dangerous, but I am far from a Flash developer. At the high level, the Flash file loads an image, rotates a portion of the center of the