You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

Thread Tools Display Modes
Old April 16th, 2021, 10:46 AM   #31
Lifetime Supporting Member

DwSoFt is offline
Join Date: Mar 2012
Location: Alberta
Posts: 953
Thanks Garry, I Have tried reinstalling as well as trying to register the dll / osx components and the regsvr32 gives me errors when trying. i also tried soem reboots and repairing office install.

I Will give nodeRed a try, i was honestly planning some python scripting to accomplish this until i came across your VBA post and figured it may be simple to implement but it has proven not to on this computer (Not your fault)/

I Was also just taking a look while i was commissioning IO, as they were very slow but it Isnt an urgent matter. Startup is tomorrow, gotta do some networking yet so ill probably do that next then try nodeRed. Just figured it would be nice to Have the Runsheet auto-populate the values that we have Transmitters for (little one off site) Thanks again for the response.
Dan Wiebe
Automation Manager
Focal Automation
  Reply With Quote
Old April 4th, 2022, 07:51 PM   #32
New Zealand

jpt is offline
Join Date: Apr 2022
Location: Wellington
Posts: 2
wsTCP_OnDataArrival: how is it triggered

I am trying to learn about Modbus TCP. The example is very helpful, thanks Garry!
One question: The Private sub wsTCP_OnDataArrival, where and how does it get triggered? I haven't found it yet, must be looking in the wrong place!?

Last edited by jpt; April 4th, 2022 at 07:58 PM.
  Reply With Quote
Old April 5th, 2022, 09:19 AM   #33

gclshortt is offline
gclshortt's Avatar
Join Date: Dec 2014
Location: Ontario
Posts: 3,219
Hi jpt,
The line of code "Dim WithEvents wsTCP As OSWINSCK.Winsock" will set up the events for wsTCP. wsTCP_OnDataArrival is just one of these events.

Connect with us on Facebook:
  Reply With Quote
Old April 5th, 2022, 05:32 PM   #34
New Zealand

jpt is offline
Join Date: Apr 2022
Location: Wellington
Posts: 2
Thanks Garry, I see. (You can tell, that is all very new to me).

It's strange though, when I have the Dim WithEvents in Excel, all is well, in MS Access it's not valid. Does that mean it cannot run in MS Access VBA?
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Modbus RTU/Modbus TCP. Terminal server? marcius LIVE PLC Questions And Answers 2 August 5th, 2013 08:36 AM
ML1400 as a modbus tcp slave? cuffers65240 LIVE PLC Questions And Answers 6 September 15th, 2011 11:56 PM
Modbus TCP and Omron CJ PLC Communication drunken LIVE PLC Questions And Answers 2 June 15th, 2007 05:09 PM
Mitsubishi Q Series Modbus TCP module QJ71MT91 set up help req'd... Pocko LIVE PLC Questions And Answers 0 July 30th, 2006 03:45 AM
Looping VBA code in Excel pagewe LIVE PLC Questions And Answers 8 February 10th, 2003 11:19 AM

All times are GMT -4. The time now is 06:36 AM.