Table of Contents
RocNetNode Configuration
Content → Command Stations → RocNet
-
- GCA-Pi01 | Pi01CAN | GCA-Pi02 | GCA-PI03 | GCA-PI04 | GCA-Pi05 | GCA-Pi06 | GCA-Pi07 | GCA107 Relay board | RocDisplay | Fast Clock
Features
- This dialog will pop up automatically in case of:
- A new node was detected by the Rocrail server.
- The push button on one of the RocNetNodes was pushed.
- Very fast Port/Channel/Macro Setup because 8 ports are set/get with one request/response.
- Drag&Drop from the index or the locality tree the RocNet-ID(bus) into layout objects.
- Drag&Drop from the port/channel setup number to set RocNet-ID(bus) and address into layout objects.
Addressing
Index
Columns
ID
The RocNet-ID of the node.
Locality
Optional locality ID. Possible use with modular layouts to group the nodes.
This locality is not part of the addressing scheme.
Vendor
NMRA listed vendor or DIY.
Class
Mnemonic | Class | Description |
---|---|---|
A | Accessory | I2C GCA-Pi02 |
D | Digital Railsync Generator | dcc232, sprog |
I | Identification (RFID) | rfid12 |
Sub IP
The Sub IP address are the last two numbers of the network IP address: xxx.xxx.subipH.subipL.
This Sub IP will be randomly generated in case the retrieval of the IP address did fail on the Raspberry Pi.
Shutdown
Shutdown the selected node.
Shutdown all
Shutdown all nodes in the network.
Show
Triggers the LED2 on the GCA-Pi01 to flash or stop flashing after the second show command.
Query
Query all available nodes in the network.
Normally this is done automatically, but in case of a second Rocrail server in the same network it can be of use.
Report
The Reporting option requires a file name which must be specified by dialog. The file format is CSV and can be read and manipulated by most spreadsheet programs.
PuTTY
For experts only. |
Opens a PuTTY terminal, ssh, connected to the selected RocNetNode for maintenance. (For Linux admins only.)
IP-Adresss = 192.168. plus RocNetNode Sub-IP.
PuTTY must have been installed, Linux/Windows, and callable.1)
Default Login
login as: pi
pi@192.168.100.84's password: raspberry
Install
Windows
Download the putty.exe from:
Linux
sudo apt-get install putty
Mac OS X
RocNet
All text fields which are marked with a @ can open the @Box by a single click on its label if the text field is not empty. The text field contents will be used to do a find. |
Nodemap
The optional locality ID is mapped with the layout Track Panels.
The plan title is used as root node label.
Context menu on nodes:
- Show
- Shutdown
Context menu on locations:
- Shutdown → All nodes in this location
Context menu on the root:
- Shutdown All nodes
ID
The RocNet ID of the Node which can be modified and written to the Node.
This ID is part of the addressing scheme and should be used as 'Bus' on interface tabs: See Addressing
Initially this ID is set to 65535 which will trigger the host software, like Rocrail, to set a new unused ID automatically.
To avoid assigning double IDs the SubIP is also part of this procedure and makes it possible to add multiple '65535' nodes at the same time.
More then one node with the same ID will lead to unpredictable side effects. The ID can only be changed if the node is the only one in the network; Remove nodes with the same ID to be able to changed. |
Locality
Optional locality number for grouping nodes.
UID-Name
This is the optional symbolic name of the RocNet-ID which can be used to address this Node.
Set
Set the new RocNet ID to the Node.
The Node will send a shutdown event and will try to identify with the new ID.
Options
Acknowledge sensor event
The host must acknowledge all sensor events within 500ms.
After this timeout the node will repeat the event. Max. retries is 10.
Use push button
In case the GCA-Pi01 is connected the push button can be activated by this option for show and shutdown actions.
RFID
GCA-Pi05
Activates the motor PWM and 16 function channels for large scale locomotives.
GCA-Pi07
Enables the GCA-Pi07 analog sensor support.
This option disables the RocMouse, GCA-Pi04, because they share the same I2C address range. (0x48-0x4F)
The used offset for reporting is 129 to avoid collisions with sensors reported by the GCA-Pi02.
Threshold
The minimal measured value for reporting a sensor as occupied.
This threshold value is also used to report again if the delta compared with the actual measurement is greater then the previous reported value for updating the load representation in Rocview.
I2C
Hardware | I2C-0 Location | I2C-1 Location | I2C-2 Location |
---|---|---|---|
RasPi Version 1 | P1 header | Not Avail. | - |
RasPi Version 2 | P5 Header | P1 Header | - |
BeagleBone Black | - | ? | ? |
For pinouts of headers P1 and P5 see http://elinux.org/RPi_Low-level_peripherals
I2C Scan
The actual connected GCA-Pixx device addresses are listed.
If the Node was new and had become automatically a new ID it could be necessary to reboot it to see the values of the I2C Scan.
- Power off
- Power on
Hardware Type
The Pi 1 and Pi 2/3 do have a different GPIO base address.
The correct setting is needed for the LEDs and button on the GCA-Pi01.
Type 'Others' is for experimental support for boards like the BananaPi; Do not use for Raspberry Pi.
DCC Type
Type | Description | Devices |
---|---|---|
none | No DCC support | |
dcc232 | DCC generation on the serial USB device. (Software CS) | /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyAMA0 |
sprog | SPROG II, SPROG 3 or S-Nano. (Hardware CS) | /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyACM0 |
DCC Device
USB device on which the DCC generator is connected.
For SPROG 3 and S-Nano select "/dev/ttyACM0".
Get/Set
Port Setup
Ports on the GCA-Pi02 can be used for all GCA interfaces.
The port numbers are fixed because they are unique by the RocNet ID.
Port
Every node has a fixed port range from 1 to 128.
See: GCA-Pi02 Address selection
Type
0=Output, 1=Input
Delay
10ms units, max. 255 * 10.
Type | Function | Zero |
---|---|---|
Input | The delayed off timer. | Direct report of state changes. |
Outputs | The pulse timer. | Continuous state. |
Blink
Use the delay as interval for blinking.
Toggle
An output will flip ON/OFF only at an ON command.
Invert
Invert the output port.
Test
Test button for output type ports.
The real state is set in this button after a Get command.
The button label is for ON "1" and for OFF "0".
Event
If set greater then zero the port on this node will be synchronized with the port on the node with ID:Port.
ID | Port |
---|---|
The sender or recipient ID. | The port number. |
Usage
Shows the Rocrail object ID which is linked to this port.
A double click in this field will open the properties dialog of the listed object.
Next > < Previous
Select a group between 1 and 16 of 8 I/Os each.
Get/Set
Get/Set the selected I/O group from the Node.
All 8 configurations are embedded in one data package.
|
Delete
Delete the 8 selected ports from the node setup.
This could be necessary in case the number of connected GCA-Pi02 has decreased.
Drag&Drop
Drag a port number to a pre-existing layout object to set the object's bus and address after drop.
20131023.142948.621 g9999I main item 0445 D&D data [bus:2:5][7] 20131023.142948.621 g9999I main item 0452 D&D command [bus] for ID [2] 20131023.142948.621 g9999I main item 0467 D&D: set bus to 2 20131023.142948.621 g9999I main item 0477 D&D: set address to 5
Channel Setup
Channels on the GCA-PI03, PCA9685 chip, can be used for:
- Servos
- Light Signals (Slow dimming)
- Lighting (Day/Night)
- …
Channel
Every node has a fixed channel range from 1 to 128.
To address a channel instead of a port the port type servo must be set on the interface tab of switches and outputs.
See GCA-Pi03 Address selection
Left/Right
The left position must be less then the right position! |
The position in range of 0…4095 for the on/off state.
Servos should range between 150 and 600.
Left/Right Steps
The number of steps to use every 10ms to travel to the wanted on/off position.
Zero will jump directly to the wanted position.
Advice: Increase this value and the delay if fine granularity is not needed, or does not add a visible effect, to save CPU power of the Raspberry Pi.
Blink
Flips to the other position after the wanted position is reached.
Report
Reports if the wanted position has been reached.
This event can be used as switch feedback: Use field events.
Servo
This option will put a channel into "sleep mode" after reaching the desired position. What this does is deenergize the servo after it reaches it's final position thus permitting manual movement of the servo motor. See section 7.3.1 of the PCA9685 data sheet for more information. Some servos like ESU for example, automatically go into sleep mode, so this option has no effect.
Delay
Delay between position commands.
The range is between 0 and 15.
0 =10ms, 2=20ms, … 15=160ms
Fine-tune
Preset
- Maximal: 0…4095
- Servo: 150…600
Test
This toggle button can be used to send an output command to the channel for testing.
Usage
Shows the Rocrail object ID which is linked to this channel.
A double click in this field will open the properties dialog of the listed object.
Drag&Drop
Macro
Features
- A macro has max. 8 command lines. To be executed the port number in a command line must be set > 0.
- Macros can be addressed by port type "macro" on the interface tab of stationary objects.
- Signal aspects are mapped to macros independent of the port type specified.
Notes
Some Operating Systems require an enter before a new cell value is accepted in the table.
Without this enter the Set command will send the old value to the RocNetNode.
Number
Macro number in the range between 1 and 128.
Port
Port number to set with the value. (1…128)
The line is not used incase set to zero.
Delay
Delay in units of 10ms before setting the new port value.
Range: 0…255 → 0…2550ms
Type
Port type:
- 0 = Output (GCA-Pi02)
- 1 = Input (Not used.)
- 2 = PWM Channel (GCA-Pi03)
- 3 = LED (Pi08)
Value
The new value to set. (0…255)
A digital output can be either 0 or 1. (0=off, 1=on)
A PWM channel can be either 0, 1 or 2…255. (0=off, 1=on, 2…255=pulse width * 16)2)
For PWM on/off the values are used from the channel definition.
Blink
This will overwrite the port blink attribute.
The delay is used as interval.
Export/Import
Export/Import all eight macro lines into a file.
Get/Set
Update
The button text, "Update" or "Poll", depends on the contents of the "New revision" field.
In case this field is empty the text will change to "Poll".
Poll
If the PC on which Rocview runs is connected to the Internet it can try to find out if a new revision is available and will display the new revision number and info.
There is probably no Internet connection possible if the button remains grayed out after a poll action.
Update
The Raspberry Pi must be connected to the Internet before updating the RocNetNode software. |
Update to the new revision.
Check http://rocrail.net/software/rocrail-snapshot/ for the correct number.
No reboot needed, and these are the steps made automatically:
- Stop the rocnetnoded service.
- Download the new installer package.
- Install the new package.
- Start the rocnetnoded service.
- Ready.
File
If the file option is checked the installer file must be copied manually in the Raspberry Pi /tmp directory before updating:
scp rocnetnode-xxxx-raspbian-armhf.deb pi@raspberrypi:/tmp pi@raspberrypi's password: rocnetnode-xxxx-raspbian-armhf.deb 100% 419KB 418.9KB/s 00:00
The default hostname of the Raspberry Pi is "raspberrypi" but could have been changed in the Raspberry Pi configuration menu.
Instead of using the terminal command "scp" other GUI programs can be used also like:
The /tmp directory is automatically cleaned up at (re)boot.
Backup Configuration
All configurations are saved in the rocnetnode.ini and can be copied to another computer for backup purpose.
The IP address can be easily composed with the Sub-IP of the RocNetNode.
The easiest way is to use a terminal with the secure copy command:
scp pi@192.168.100.168:/opt/rocnet/rocnetnode.ini .
WinSCP or Filezilla can also be used with the SFTP protocol.
Restore
Before restoring the rocnetnode.ini the RocNetNode program has to be stopped to prevent overwriting the restored ini file.
ssh pi@192.168.100.168 sudo service rocnetnoded stop exit
Restore the rocnetnode.ini:
scp rocnetnode.ini pi@192.168.100.168:/opt/rocnet/
Start RocNetNode:
ssh pi@192.168.100.168 sudo service rocnetnoded start exit