TheDave2 Posted August 28, 2012 Report Share Posted August 28, 2012 Using UnCmDrv1 in Excel I can read all day long all the data I need for Integers, Longs and bools. But, when I try to write , nothing happens. Using the V1040 'info mode' : Ethernet Monitor, I can see the data when it is read, and also the stats with "parameter Summarize". When trying to write, the port on the V1040 does open, but no packet data counter change. This leads me to beleive that PC end is the problem. The write portion of my program is exactly like the read porition: Call mComDriver.Read_MemIntegers(aLocation, 1, iMI, 0) ' GET INTEGER theValue = iMI(0) and for writting: iMI(0) = theValue Call mComDriver.Write_MemIntegers(aLocation, 1, iMI, 0) ' PUT INTEGER So, does this function even work ? Is there some other "With mComDriver" field I have to set to write ? Cannot find ANY documentation for the UnCmDrv1.xxxx functions. Please help ! Thanks, Dave Link to comment Share on other sites More sharing options...
Gabriel Franco Posted August 29, 2012 Report Share Posted August 29, 2012 I´ve used this procedure to write a single MI register: Public Function SetMIValue() As Integer Dim MI() As Integer Const Address As Integer = 12 ReDim MI(0) MI(0) = 433 SetMIValue = mComDriver.Write_MemIntegers(Address, 1, MI) End Function Link to comment Share on other sites More sharing options...
Saragani Posted August 30, 2012 Report Share Posted August 30, 2012 "So, does this function even work ?" Yes. I'm not seeing anything wrong with the request you have made. If you are using ethernet then you can use WireShark to sniff the communication packets and see what the PC sends. If you are using serial port, then there are programs like "Serial Monitor" that can listen to your serial port communication. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now