Communication with mgv85 v1.2 and MGV50

RocNet(RaspberryPi), mergCBUS and LocoNet based hardware developed by Peter Giling. (GCA)
Documentation: http://wiki.rocrail.net/doku.php?id=english#hardware
Order information: http://wiki.rocrail.net/doku.php?id=gca:gca-index-en/

Communication with mgv85 v1.2 and MGV50

Postby dukeboy » 24.02.2010, 17:04

Hi there,

I am new at the rocrail front and i have a basic question. I build the MGV85 (v1.2), the MGV50d and the MGV93 to do some initial testing.
I connected the MGV85 with a RS232 cable to my com port and the MGV 50 with a loconet cable, everything accoring to the information of the MGV. The pics 16F873A are programmed and the green leds on both pcb's are on together with the 13V led on the MGV85.

I have no control box connected. I would like to program the MGV50 with rocrail loco IO but i can not connect to through the loconet. Wat do i have to adjust in rocrail. I'm running in virtual mode at the moment.

Roger Dukers
dukeboy
 

Postby ron&bram » 24.02.2010, 18:34

Hi Roger,

When with "running in virtual mode" you mean that you use the virtual command station you will never connect to the mgv50, the virtual command station is exaclty what the name says, virtual, nothing is leaving the computer. You need to add a loconet command station to be able to communicate with the mgv.

Best regards, Ronald
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 

Re: communication

Postby dukeboy » 24.02.2010, 23:00

Hi Ronald,

thanks for your reaction. I added a loconet command station and i see in the log that rocview is trying to connect.
The following error occurs:

Couldn't access giveio device

see the attached log file.
I'm not experienced enough to understand what rocview is doing.

Regard, Roger
You do not have the required permissions to view the files attached to this post.
dukeboy
 

the log file

Postby dukeboy » 24.02.2010, 23:03

n OApp 0685 ptIID = []
20100224.224746.798 r9999I main OApp 0686 svIID = []
20100224.224746.798 r9999I main OApp 0687 lcIID = []
20100224.224746.798 r9999I main OModel 0330 parsePlan file: bryan.xml
20100224.224746.845 r9999I main OModel 0367 parsePlan title: Bryan
20100224.224746.845 r9999I main OModel 2154 init clearingMaps...
20100224.224746.845 r9999I main OModel 2173 init creatingMaps...
20100224.224746.860 r9999I main OModel 1667 createMap() tklist,137.
20100224.224746.860 r9999I main OModel 1667 createMap() fblist,49.
20100224.224746.876 r9999I main OModel 1667 createMap() swlist,23.
20100224.224746.876 r9999I main OModel 1667 createMap() sglist,13.
20100224.224746.876 r9999I main OModel 1667 createMap() colist,1.
20100224.224746.876 r9999I main OModel 1667 createMap() stlist,7.
20100224.224746.876 r9999W main OModel 1670 createMap: ttlist NOT found.
20100224.224746.891 r9999W main OModel 1670 createMap: seltablist NOT found.
20100224.224746.891 r9999W main OModel 1670 createMap: aclist NOT found.
20100224.224746.891 r9999I main OModel 1667 createMap() bklist,19.
20100224.224746.891 r9999W main OModel 1670 createMap: txlist NOT found.
20100224.224746.907 r9999I main OLib 0046 rocs_lib_load OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll]
20100224.224746.907 r9999I main OLib 0060 rocs_lib_getProc OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll:rocGetLcDrInt]
20100224.224746.907 r9999I 00001794 OLcDrive 0514 LcDriver 1.3.0 loaded for BR003
20100224.224747.907 r9999I main OLib 0046 rocs_lib_load OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll]
20100224.224747.923 r9999I main OLib 0060 rocs_lib_getProc OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll:rocGetLcDrInt]
20100224.224747.923 r9999I 00001794 OLcDrive 0514 LcDriver 1.3.0 loaded for BR216
20100224.224747.923 r9999I main OLib 0046 rocs_lib_load OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll]
20100224.224747.923 r9999I main OLib 0060 rocs_lib_getProc OK [D:\Program Files\Model treinen\Rocrail\./lcdriver.dll:rocGetLcDrInt]
20100224.224747.923 r9999I 00001794 OLcDrive 0514 LcDriver 1.3.0 loaded for BR221
20100224.224747.923 r9999I main OModel 1667 createMap() lclist,3.
20100224.224747.938 r9999I main OModel 1667 createMap() carlist,0.
20100224.224747.938 r9999I main OModel 1667 createMap() waybilllist,0.
20100224.224747.938 r9999W main OModel 1670 createMap: operatorlist NOT found.
20100224.224747.938 r9999W main OModel 1670 createMap: locationlist NOT found.
20100224.224747.938 r9999W main OModel 1670 createMap: sclist NOT found.
20100224.224747.938 r9999I main OModel 2193 init creatingFbAddrMap...
20100224.224747.938 r9999I main OModel 1690 createFbAddrMap: size=49.
20100224.224747.938 r9999I main OModel 1712 createSwAddrMap: size=0.
20100224.224747.938 r9999I main OModel 1733 createCoAddrMap: size=1.
20100224.224747.954 r9999I main OModel 2198 init blockInit...
20100224.224747.954 r9999I main OModel 3185 loading occupation file [occ.xml]
20100224.224747.954 r9999I main OBlock 1358 init block LUS4B
20100224.224747.954 r9999I main OBlock 1358 init block SSB2.0
20100224.224747.954 r9999I main OBlock 1358 init block SSB2.1
20100224.224747.954 r9999W main OSignal 0630 control is not initialized
20100224.224747.954 r9999I main OBlock 1358 init block SSB2.2
20100224.224747.954 r9999W main OSignal 0630 control is not initialized
20100224.224747.954 r9999I main OBlock 1358 init block SSB2.3
20100224.224747.954 r9999W main OSignal 0630 control is not initialized
20100224.224747.954 r9999I main OBlock 1358 init block SSB2.4
20100224.224747.969 r9999W main OSignal 0630 control is not initialized
20100224.224747.969 r9999I main OBlock 1358 init block SSB2.5
20100224.224747.969 r9999W main OSignal 0630 control is not initialized
20100224.224747.969 r9999I main OBlock 1358 init block SSB2.6
20100224.224747.969 r9999I main OBlock 1358 init block SSB1.0
20100224.224747.969 r9999I main OBlock 1358 init block SSB1.1
20100224.224747.969 r9999W main OSignal 0630 control is not initialized
20100224.224747.969 r9999I main OBlock 1358 init block SSB1.2
20100224.224747.969 r9999W main OSignal 0630 control is not initialized
20100224.224747.969 r9999I main OBlock 1358 init block SSB1.3
20100224.224747.969 r9999W main OSignal 0630 control is not initialized
20100224.224747.969 r9999I main OBlock 1358 init block SSB1.4
20100224.224747.985 r9999W main OSignal 0630 control is not initialized
20100224.224747.985 r9999I main OBlock 1358 init block SSB1.5
20100224.224747.985 r9999W main OSignal 0630 control is not initialized
20100224.224747.985 r9999I main OBlock 1358 init block SSB1.6
20100224.224747.985 r9999W main OSignal 0630 control is not initialized
20100224.224747.985 r9999I main OBlock 1358 init block SSB1.7
20100224.224747.985 r9999W main OSignal 0630 control is not initialized
20100224.224747.985 r9999I main OBlock 1358 init block LUS1B
20100224.224747.985 r9999I main OBlock 1358 init block LUS2B
20100224.224747.985 r9999I main OBlock 1358 init block LUS3B
20100224.224747.985 r9999I main OMVTrack 0220 MVTrack
20100224.224747.985 r9999I main OMVTrack 0177 Init sensors for the MVTrack...
20100224.224747.001 r9999W main OMVTrack 0184 Sensors for the MVTrack could not be initialized.
20100224.224747.001 r9999I main OControl 0798 initDigInts lib="virtual" idd="vcs-1"
20100224.224747.001 r9999I main OLib 0046 rocs_lib_load OK [D:\Program Files\Model treinen\Rocrail\virtual.dll]
20100224.224747.001 r9999I main OLib 0060 rocs_lib_getProc OK [D:\Program Files\Model treinen\Rocrail\virtual.dll:rocGetDigInt]
20100224.224747.001 r9999I 00001794 OVirtual 0413 ----------------------------------------
20100224.224747.001 r9999I 00001794 OVirtual 0414 virtual 1.3.0
20100224.224747.001 r9999I 00001794 OVirtual 0415 ----------------------------------------
20100224.224747.016 r9999I main OControl 0798 initDigInts lib="loconet" idd="Loconet"
20100224.224747.016 r9999I main OLib 0046 rocs_lib_load OK [D:\Program Files\Model treinen\Rocrail\loconet.dll]
20100224.224747.016 r9999I main OLib 0060 rocs_lib_getProc OK [D:\Program Files\Model treinen\Rocrail\loconet.dll:rocGetDigInt]
20100224.224747.016 r9999I 00001794 OLocoNet 2303 ----------------------------------------
20100224.224747.016 r9999I 00001794 OLocoNet 2304 loconet 1.3.0
20100224.224747.016 r9999I 00001794 OLocoNet 2305 ----------------------------------------
20100224.224747.016 r9999I 00001794 OLocoNet 2307 iid =Loconet
20100224.224747.016 r9999I 00001794 OLocoNet 2308 sublib =serial
20100224.224747.016 r9999I 00001794 OLocoNet 0046 device =com1
20100224.224747.016 r9999I 00001794 OLocoNet 0047 bps =19200
20100224.224747.032 r9999I 00001794 OLocoNet 0048 flow =none
20100224.224747.032 r9999I 00001794 OLocoNet 0049 ctsretry=1000
20100224.224747.079 r9999I SSW1.07 OSwitch 1013 Accessory control thread for "SSW1.07" started.
20100224.224747.079 r9999I SSW1.08 OSwitch 1013 Accessory control thread for "SSW1.08" started.
20100224.224747.079 r9999I SSW1.01 OSwitch 1013 Accessory control thread for "SSW1.01" started.
20100224.224747.079 r9999I 00001794 OLocoNet 0050 ----------------------------------------
20100224.224747.079 r9999I SSW1.02 OSwitch 1013 Accessory control thread for "SSW1.02" started.
20100224.224747.079 r9999I SSW1.03 OSwitch 1013 Accessory control thread for "SSW1.03" started.
20100224.224747.079 r9999I SSW1.04 OSwitch 1013 Accessory control thread for "SSW1.04" started.
20100224.224747.079 r9999I SSW1.05 OSwitch 1013 Accessory control thread for "SSW1.05" started.
20100224.224747.079 r9999I SSW1.06 OSwitch 1013 Accessory control thread for "SSW1.06" started.
20100224.224747.079 r9999I SSW1.09 OSwitch 1013 Accessory control thread for "SSW1.09" started.
20100224.224747.079 r9999I SSW2.01 OSwitch 1013 Accessory control thread for "SSW2.01" started.
20100224.224747.079 r9999I SSW2.02 OSwitch 1013 Accessory control thread for "SSW2.02" started.
20100224.224747.079 r9999I SSK1 OSwitch 1013 Accessory control thread for "SSK1" started.
20100224.224747.079 r9999I SSW2.10 OSwitch 1013 Accessory control thread for "SSW2.10" started.
20100224.224747.079 r9999I tick01C3 OSystem 0104 Ticker thread has started.
20100224.224747.079 r9999I BR003 OLoc 0992 Runner for "BR003" started.
20100224.224747.079 r9999I BR216 OLoc 0992 Runner for "BR216" started.
20100224.224747.079 r9999I BR221 OLoc 0992 Runner for "BR221" started.
20100224.224747.079 r9999I transact OVirtual 0348 Transactor is started.
20100224.224747.328 r9999I 00001794 OSerial 0090 Opening serial[com1] [return code=0] [0] [OK]
20100224.224747.328 r9999I 00001794 wunc 0190

Couldn't access giveio device



20100224.224747.344 r9999I 00001794 OSerial 0111 blocking[1] directIO[0]
20100224.224747.344 r9999I main OControl 0850 initDigInts OK
20100224.224747.344 r9999I main OControl 0161 Init shortcut sensor...
20100224.224747.391 r9999I lnreader OLocoNet 1276 LocoNet reader started.
20100224.224747.391 r9999I lnwriter OLocoNet 0905 LocoNet writer started.
20100224.224747.391 r9999I swreset OLocoNet 0729 LocoNet swReset started.
20100224.224747.391 r9999I slotping OLocoNet 0690 LocoNet slotPing started.
20100224.224747.391 r9999I clocktic OControl 0943 ClockTicker started.
20100224.224747.391 r9999I checker OControl 1000 Checker started.
20100224.224747.437 r9999I main OClntCon 0478 ClientConnection started on port 62842.
20100224.224747.453 r9999I main OModel 0496 updateFB
20100224.224747.453 r9999I main OApp 0736 MemOp.getAllocCount() = 45044
20100224.224747.484 r9999I cconmngr OClntCon 0317 Manager started.
20100224.224816.422 r9999I cmdr01C3 OClntCon 0209 cmdReader started for:127.0.0.1.
20100224.224816.469 r9999I infw01C3 OClntCon 0104 infoWriter started for:127.0.0.1.
20100224.224847.435 r9999I 00000D00 OLocoNet 2069 set clock
20100224.224847.435 r9999I 00000D00 OLocoNet 1572 Trying to get fast clock slot.
20100224.224848.106 r9999I 00000D00 OLocoNet 1617 Could not get fast clock slot. (no response...)
20100224.224948.135 r9999I 00000D00 OLocoNet 2069 set clock
20100224.224948.135 r9999I 00000D00 OLocoNet 1572 Trying to get fast clock slot.
20100224.224949.915 r9999I 00000D00 OLocoNet 1617 Could not get fast clock slot. (no response...)
20100224.225053.859 r9999I 00001378 OApp 0815 SHUTDOWN
20100224.225053.859 r9999I 00001378 OModel 1483 sys: shutdown
20100224.225053.859 r9999I 00001378 OModel 1488 informing 3 listeners of a system event...
20100224.225053.874 r9999I 00001378 OLocoNet 1920 SysCmd shutdown
20100224.225053.874 r9999I 00001378 OModel 1738 Saving plan [bryan.xml]...
20100224.225053.890 r9999I 00001378 OModel 1749 Serialized Plan=60193
20100224.225054.983 r9999I 00001378 OModel 0278 60193 bytes saved in bryan.xml.
20100224.225054.999 r9999I 00001378 OModel 1754 Plan Saved.
20100224.225054.999 r9999I 00001378 OModel 3156 writing occupation file [occ.xml]
20100224.225054.030 r9999W 00001378 OApp 0825 For shutdown in console mode use q<enter>
dukeboy
 

Postby ron&bram » 25.02.2010, 10:04

Hi Roger,

Forget the giveio message, as stated in the Wiki, giveio.sys is ONLY required for DDX, to allow direct access to the serial port without using the windows driver level, for connecting to the MGV85 this is not important. I think you have not set the communication parameters correctly, you need a baudrate of 57600 and cts/rts hardware flowcontrol enabled, as described here: http://wiki.rocrail.net/doku.php?id=mgv85-en#line_settings. From the trace I see that you now have a baudrate of 19200 and flowcontrol off.

Best regards, Ronald
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 

New start

Postby dukeboy » 26.09.2012, 20:44

Hello, after a period of 2 years without my railroad hobby I want to start over again concerning the digitalizing of my track.
This topic is stil the case. I included de ini and trc file. Is somebody out there who can help me with this
You do not have the required permissions to view the files attached to this post.
dukeboy
 

Postby rjversluis » 26.09.2012, 20:55

Just remove the virtual command station.

It is set as first in the list so all commands will got to the virtual CS if no IIDs are set; The virtual CS cannot communicate with the LocoIO modules.

http://wiki.rocrail.net/doku.php?id=roc ... -en#sv_iid
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Settings

Postby dukeboy » 26.09.2012, 21:49

Hello Rob,
thanks for the quick response. As far as i understood the settings the virtual CS was already removed. See my settings in the attached file.
Regards, Roger
You do not have the required permissions to view the files attached to this post.
dukeboy
 

Postby ron&bram » 26.09.2012, 21:54

Hi Roger,

Without a screenprint of the Rocrail settings with the tab "controller" selected it is hard to judge which command stations are defined. If in the Rocrail properties, tab controller, there is a line with the word virtual in it, select that line, press the delete button, press the OK button, quit and restart Rocrail and Rocview.
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 

See previous message

Postby dukeboy » 26.09.2012, 22:10

Hi Ronald,
Please see my previous reply. In the attachment the word document shows the settings. The virtual conroller was already removed.

regards Roger
dukeboy
 

Postby Liviu M » 27.09.2012, 07:31

Hi Roger,

do you have any Loconet central station (I mean a real, physical one, not defined in Rocrail)?
If not, have you activated the current source on your MGV85 as stated in the wiki page?

The communication inside LocoNet is made by short-circuiting the communication line (J2{3}) to ground.
This means of course that there should be some kind of power on the line.
That 'power' is a current source of 15-20 mA somewhere connected to the communication line.
The most logical place is on the computer interface. Jumper JP6 must be placed to enable that current source to LocoNet line.


Regards,
Liviu
Liviu M
 

Postby ron&bram » 27.09.2012, 18:08

Hi Roger,

In the traces you posted I can see that Rocrail is able to open port com1, so that is OK. However, in the traces I also see that there is a timeout on the CTS signal when Rocrail wants to communicate with the MGV85. In other words, the handshake on the serial communication is not working (properly). Do you have a real serial port or an USB-RS232 convertor? Is the serial cable fully wired?
Best regards, Viele Grüsse, vriendelijke groeten, Ronald :rr_cap:
GCA85/50/93/145/146/153 Loconet, Twincenter+booster for locs, seperate booster for accessory decoders, dedicated laptop with XP and Ubuntu for Rocrail, AndRoc, LGB indoor OTF layout
ron&bram
 


Return to GCA (Hardware by Peter Giling)