LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm having problems communicating with my opc server after a few minutes of operation.

I'm using Industrial Automation OPC Servers 5.1 and Labview 6.1 Professional Development Package on a Windows NT 2000 Ver. 5.1 w/service pack 4 installed. While running my machine for a few minutes the data sockets seem to quit updating. I can see on my koyo 250 plc that the bits are set but they don't show this in my labview code. I'm using front panel data sockets with local variables to publish and subscribe to the server. This procedure works fine with the other systems that I have built. Can anyone steer me in the right direction to correct this problem?
0 Kudos
Message 1 of 6
(3,088 Views)
"I'm using front panel data sockets with local variables to publish and subscribe to the server."

How many front panel datasocket connections do you have?

(I've got DL350's and a 240 CPU. Usually use LVDSCv6.1, but have on occasion used FP datasockets without problems, but it's only been for a few items.)
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 2 of 6
(3,084 Views)
I am only using 25 front panel sockets. The program makes 2 passes. The first 1 runs just fine but halfway through the second pass the data sockets quit updating. Although, looking at the dcm module you can still see that its polling and you can also see the OPC icon active in the window on the windows menu bar.
0 Kudos
Message 3 of 6
(3,079 Views)
"I am only using 25 front panel sockets. The program makes 2 passes. The first 1 runs just fine but halfway through the second pass the data sockets quit updating."

Hi Rick,
I'm not sure by what you mean by "passes" and when "the data sockets quit updating" do the DataSocket LED's go off or do they stay green with the value not changing (when you know it should be changing)?

I threw together a quick LV program using DS to publish/subscribe to ~30 items in a DL350 CPU (which in terms of its memory map/relevant details is almost exactly the same as a DL250).
It's run fine throughout the day. On the PC/software side, I've got pretty much the same system as you except that I'm using an older version of the IA Servers (v4.5). Attached jpg shows the config of the server/protocol.

If you want to post your code (or some of it), I could try it out. Otherwise I'm just taking shots in the dark until more details.

Example shot in dark:
If the configuration screen in IAServers v5.1 hasn't changed much from v4.5, and you've configured the protocol as "DCM (n)", I'm pretty sure you'll get confusing results from any individual Booleans with publish/subscribe links.

Or are you communicating with IA's Modbus driver?
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 4 of 6
(3,066 Views)
Hi Donnald,
I've built a grinder with an auto load/unload station as well as an IMAQ Inspection/Part alignment station. I use the PLC to handle all the I/O stuff and NI to control motion and vision. What I mean by passes is that the machine completed one part from start to finish.

The machine completes the first part but half way through the second part the data sockets quit updating although, the data socket status indicator is green. I am using a DCM module but I am using the upper port(k) selection in the server. I tried using the DCM selection but I cant establish communication with the plc. I will send you my program but I doubt you will be able to run it although you might see an obvious mistake. I am just a beginner with Labview. The main program is "ALFG Rev 6b.vi"

Thanks for the help so far,

Rick
0 Kudos
Message 5 of 6
(3,040 Views)
Hi Rick,

I found 58 FP DataSocket connections, all Booleans tied to individual PLC coils. You might have more if I missed a cluster or tab:
- 26 pub/subscribes to PLC coils spread between C202 and C267
- 32 subscribes to coils C0-C37 (on your Opto tab)

The maximum number of DS connections that gets mentioned in a common little blurb throughout NI's website/literature about when it would be good to drop using DataSocket to connect to OPC and switch to LV's DSC module varies from place to place. Usually it's 100, sometimes it's 50, and in one place I've seen 30. It is subjective and depends on your performance needs.

You can easily cut the number of DS connections to from 58 to 28; and with a bit a work it can go down to 3: just access all these Booleans from their DL 250 V-mem locations/registers.

The easy cut is for C0-C37. If you connect a U32 numeric to ALFG_DL1.VD40600, you get everything in 1 shot instead of 32. The U32 can easily be converted into a cluster for display purposes as shown in jpg (or you can just index the earlier Boolean array into 32 individ controls).

The cut to get from 28 to 3 DataSockets would require a change in all your writes to the other coils. The status of C200-C237 and C240-C2777 can be accessed as U32's from VD40610 and VD40612 respectively. Everytime you want to change one bit, you'd have to a bit of masking and write the whole 32bits (also in jpg). With a little bit of work in octal and hex, this can be programmed neatly in a subVI. I had one long ago for 16 bits.

No guarantee that your program will work with 3 DS though. It certainly is big. If you want other comments or have questions, just ask.

donald
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 6 of 6
(3,023 Views)