Upgrading old ctl files to read new Modbus drivers


oldgrey1

Recommended Posts

OK, several parts here:

1) clearing out the loading of the old driver: you'll need the driver installed, at least temporarily. Go to quick-device configuration, highlight ModbusASCII then click on View Raw. Delete everything there and save. Save the doc, delete the old driver and restart in safe mode.

2) create a new device with Modbus ASCII. This is largely covered in the user's guide. Go to quick device configuration, select new Serial/Ethernet, call your device something other than ModbusASCII so you don't get confused with the old driver, create a serial port for it and select ModbusASCII (not slave).

3) finally you need to switch your channels over. I'd first print the current settings, or take a screen shot or export them. Then go through and select the new device you just created and the correct I/O type. This likely will reset some of the other parameters (like history), so you'll need to update them as well.

Technically if you knew exactly which ones went where, you could also Export the entire channel list to Excel, make the changes there, then import back, but you have to have the strings for the I/O type exactly right. Also, this won't work if you have any Events in your channels.

But, if you keep the channel names the same, once you do the switch all your pages will work as before.

Link to comment
Share on other sites

OK, thanks for that.

I cleaned out the old driver stuff and re-named the Channels after creating a new device using ModbusASCII and it is connected to a COM port. The settings now are as they were previously;

BaudRate,9600

CommunicationsPort,COM4

DataBits,8

HoldRTSInRx,0

HoldRTSInTx,0

Parity,None

ReleaseRTS,0

skipEcho,0

StopBits,1

T1Delay,0

T2Delay,0

T3Delay,0

Timeout,3000

This is the line cleaned out from the old driver = new settings in new GUI.

The next issue is that I can't get "it" to read anything now!

The error is;

"P-ModbusASCII 0010: Timeout: ReadBatch1 Line 10 - Uncaught error in sequence ReadBatch1"

The line 10 in question in the sequence ReadBatch1 is;

>> this is Line 10 >>>Private.data = Device.MyDevice.ReadHoldingU16(1,0,11)

//Private.data = Device.ModbusASCII.ReadHoldingRegistersU(1,0,1)

B1_7_SetPoint_Value.AddValue(Private.data[0][0])

B1_7_SetPoint_Value1.AddValue(Private.data[0][1])

etc.

I have tried all the ReadHoldingxxx options in the intellisense pulldown.

The Channel I/O Type is set to:

MyDevice,

1,

Read Holding U16 (3),

1, etc.

With the old driver, the // commented out line did the business = whether for 1 address or many.

I have tried to Read Inputs;

Private.data = Device.MyDevice.ReadInputU16(1,100,10)

B1_7_HoldingReg001.AddValue(Private.data[0][0])

The Channel is set to ;

MyDevice,

Read Input U16 (4)

same issue - the line that sets up the polling has an error(????)

The old driver works a treat - just don't know how to write to a Holding Register with it.

Any ideas?

Thanks.

Link to comment
Share on other sites

Could not get the new drivers to read anything - one at a time or 11.

Found some inspiration on the Modbus web site and am using the old drivers, got it all working.

What are the issues with developing on one PC and then copying the file to another? e.g. on my laptop it was running the whole application fine and changing Holding Register value on the main device.

I copied the ctl to the production machine - in Developer mode it worked fine. Then I stopped it and opened the file in runtime and it had an issue with "D0100-0104 LINK: error opening connection"

I resorted to making the changes on the operational file copy on the production PC and it all worked perfectly. (The same file that served as the basis for doing the changes on my laptop which I got working on that.)

It seems that there is some corruption taking place?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.