Keyboard Shortcuts
Likes
Search
Locked TMCC2 Commands in JMRI
I have made pretty good progress in the TMCC-2 command syntax. It is substantially different from TMCC1.?
The throttle needs the ability to select the appropriate setOpCode in order to set the first byte. This first byte lets the base station know which command format is being used. TMCC-1 or TMCC-2. As you switch between TMCC-1 to TMCC-2 the command set changes drastically. TMCC-2 has a 2 9 bit command bit syntax and 1 3 word command format. Because of this the JMRI throttle needs to allow the user to formulate the command via key strokes. TMCC-1 and TMCC-2 need to have their own class and 3 system connections 3 System connections because Lionel has 3 base stations. TMCC, Cab1L and CAB2L. TMCC only TMCC-1 Cab1L TMCC-1 and Limited TMCC-2 Cab2L TMCC-1 All TMCC-2 I'm trying to figure out the best way to organize the command list to roll into XML. From there is the GUI and then parsing itself. Hopefully I can get it to the point where the experts can evaluate what I have, fix my errors and make it an acceptable module.? ? Inobu |
Could you please explain in more detail what "the JMRI throttle needs to allow the user to formulate the command via key strokes¡± means please?
My naive understanding is that this means that the person driving a train can¡¯t just change the speed or a function, and instead has to know the specific details of the communications protocol. But I must misunderstand, because that¡¯s just crazy. The entire reason JMRI exists is so that people _don¡¯t_ have to do that. So I¡¯d a appreciate a detailed explanation. Bob On Oct 24, 2019, at 9:04 PM, Inobu One via Groups.Io <one2beros@...> wrote:-- Bob Jacobsen rgj1927@... |
I will explain it but lets go through an exercise so you can experience the issue.?
A Legacy engine utilizes the TMCC-2 command set. It has the feature to operate or turn on the Ground lights of an engine. Can you setup your JMRI to run TMCC and initiate the command to turn on the Ground lights for Engine 65. Open the TMCC command monitor so you can see the command being sent and post what you send out and how you did it. In turn I will show you what you should have sent out. Inobu ? |
The way JMRI is supposed to work is that some function key on the throttle will be mapped to do that. The person running the engine pushes that button, and the program works out the command to send: No command monitor, no keying in specific commands.
That¡¯s what JMRI does for TMCC, Digitrax, Lenz, NCE, EasyDCC, MRC, SPROG, OpenLCB, TAMS, Zimo, DCC++, Roco, eCos and Marklin. There¡¯s no need for the person running the train to know what specific commands are being sent. The people who wrote the code need to know that, of course, and need to put that in the code. The code for different flavors of TMCC will have to sent different commands, maybe even different sequences of commands. So, no, I¡¯m not going to do what you ask because it¡¯s not how JMRI is supposed to work for users. It such a strange request that I still think I¡¯m just not understanding what you¡¯re trying to do. Bob On Oct 24, 2019, at 9:49 PM, Inobu One via Groups.Io <one2beros@...> wrote:-- Bob Jacobsen rgj1927@... |
Inobu,
On any DCC decoder that would be some function key operation. To the throttle, it only knows it as a function X, and maybe a custom label with would say 'Ground Lights'. The backend down in the TMCC code, would build the command sequence to tell that loco to activate function X. Are you saying that for TMCC2 it is predefined for what each function does? -Ken Cameron, Member JMRI Dev Team www.jmri.org www.fingerlakeslivesteamers.org www.cnymod.org www.syracusemodelrr.org |
Bob is exactly right.
toggle quoted message
Show quoted text
I have only a TMCC command station and I have some Legacy ( TMCC 2 ) . Equipment. They work fine for the features that the basic TMCC command set sends out but I cannot control some of the more advanced features. We do not need different connections or types, just more command strings of the lithe type. This is getting way over complicated. Legacy equipment just recognizes more commands because the command string CAN start with a different sequence which makes the decoder realize that it is an EXTENDED command and execute it. TMCC has some commands that are always the same per a given function key, like horn and bell and front and rea coupler. The others and even those could be anything else from open the door on a milk car to start the rotary blade on the rotary snow plow. I have a legacy crane that is perfectly controllable with the TMCC throttle. It used the speed up command to rotate CW and the speed down command to rotate CCW. That is just trueing the knob CW or CCW on the original TMCC throttle . That know was never intended to be a direction control for a crane cab rotation but since a crane does not have a propulsion motor the decoder in it uses that for something else. I have created several ¡°templates¡± for the function keys in TMCC to use with different locomotives. The accessory or car or engine that comes with TMCC also lists the functions that that specific piece of rolling stock responds to an AUX 1 + 4 command is just for that device. We can easily build the command string for all of the basic functions key possibilities in Legacy, leave the ones from the original TMCC alone since the decoder will sort that out. Then you just label the function keys like we do for every other type of rolling stock or accessory and we are done. Jim LeFevre Engineering James L. LeFevre P.E. 2801 S 24 th St. Rogers, AR. 72758 jlefevre1@... On Oct 25, 2019, at 5:31 AM, Ken Cameron <kcameron@...> wrote: |
Bob,
You could not have done it anyways. The coding is not completed in JMRI which is my point. Had you even bothered to try it would have been quite evident. But I'll follow through with what I said I would do. The command to turn on the ground lights for an engine with the TMCC ID 65 is hF8 h83 h7D hFB h82 hD2 hFB h82 h29? ? The is the command string with the correct Checksum value. You would not have been able to issue the command because the Throttle has no provisioning to change the first command byte also known as setOpcode from hFE to the required hF8.? The truncation only looks for hFE and because of that nothing would be generated.? Its unfortunate that you are taking this stance but who am I to say anything. I am basically telling you here are the TMCC-1's version of Extended CV values and they need to be coded so they can be accessed by the user but you are telling me that JMRI doesn't need to do that. Inobu ? ? |
¿ªÔÆÌåÓýI think you are taking Bobs message the wrong way. ? JMRI is designed so that the user interface is the same whatever hardware is attached to it. So it is YOUR job to make an abstraction layer that replaces the TMCC-1 layer with a TMCC-2 layer. This layer then becomes the operative hardware abstraction layer when JMRI is set up to use TMCC-2. ? I am sure Bob and any others of the development team will help you with doing that. ? ? ? From:
[email protected] <[email protected]> On Behalf Of
Inobu One via Groups.Io ? Bob,
|
Ken,
TMCC-2 has 253 commands. How can 28 function key support that? The TMCC-2 commands are completely different from the TMCC-1 structured. For example. If you were running a TMCC-1 engine on a TMCC-2 layout the command sent to the engine must be TMCC-1. It is the setOpCode FE in the command that identifies TMCC-1. TMCC-2 is identified as F8. Furthermore TMCC-2 refers to Lash-ups as Trains. Any commands sent to a Lash-up/Train has an setOpCode of F9. This is how an engine commands are differentiated from a lash-up. Within the TMCC-2 three word command format there are parameter indexes. These indexes formulates the commands to control lighting, effects, sound dialogs and other effects. In order for these actions to be executed the command must be formulated and sent.? What's really perplexing is I'm giving precise information about the coding and its correlation to the coding in JMRI and I still getting no.......I offer an example to see and get no I'm not doing that....lol Oh well.......The hardest part is behind me now. Once I get the GUI right linking with Serialmessage,port and reply is on the list. Inobu ? |
Alan,
Will you please just try it. So you can see. Start up a TMCC connection in simulation mode. Open the TMCC monitor and Send TMCC command windows.? Then pull up a throttle and set the address to 65. then press the command to turn on the light The command is displayed on TMCC monitor. [FE 20 8D]? Cmd: engine 65 AUX2 option 1 (CAB AUX2 button) [FE 20 8D]? Cmd: engine 65 AUX2 option 1 (CAB AUX2 button) [FE 20 8D]? Cmd: engine 65 AUX2 option 1 (CAB AUX2 button) [FE 20 8D]? Cmd: engine 65 AUX2 option 1 (CAB AUX2 button) FE is for TMCC-1 in order to send a TMCC-2 command that FE needs to be F8 along with 8 other bytes. This is an example of a complete TMCC command F8 83 7D FB 82 D2 FB 82 29 Copy and past the FE 20 8D and send it out. then copy and paste the F8 83 7D FB 82 D2 FB 82 29 and send it out.? Nothing happens because the code does compile F8? I can't understand why people won't consider that TMCC is different than DCC and requires a different configuration. Anyway, I'm a lot more comfortable with everything now. Inobu |
I can't understand why people won't consider that TMCC is different than DCC and requires a different configuration.We understand that TMCC is different to DCC. What you don't understand is that the differences between the various hardware systems is dealt with in the underlying abstraction layer of JMRI. I don't need to try anything. You have the necessary information to change the abstraction layer to handle TMCC-2. I have no interest in doing anything about TMCC-2 as I am unlikely to ever have such a system in my sights let alone use it. |
Jim,
There are 2 levels of legacy commands and base stations the Cab1L and the Cab2L. Your crane operates at Cab1L level. The Cab2L is the extended version and uses 9 byes that last being the Checksum. I know for a fact the checksum is not performed in JMRI and because of that you are only accessing 65 of the 200 commands available. You have created templates for the 28 commands coded. Lets see you Start UP sequence 1 for the Prime Mover, Set the Engine labor to 15. ? There is no way to access them unless its coded. Oh well....... Inobu |
Because people are trying to help you understand how JMRI works.
Several of the people who commented on this thread _actually_ _wrote_ the code involved. We may misunderstand what you¡¯re saying, which is why I asked my original question: Could you please explain in more detail what "the JMRI throttle needs to allow the user to formulate the command via key strokes¡± means please? I still haven¡¯t heard an answer to that. JMRI is open source, and you¡¯re welcome to modify it in any way you want subject to only some limitations: Since you have opinions about how you want to do this, please go ahead. In the past, we¡¯ve had people want to create and contribute something, but they took a direction early on that make their work so inconsistent with how JMRI works for users that it ended up being a lot of work. So there¡¯s some desire here to help people understand how JMRI works, and make the entire process easier. Next steps are up to you, I think. Bob On Oct 25, 2019, at 6:45 AM, Inobu One via Groups.Io <one2beros@...> wrote:-- Bob Jacobsen rgj1927@... |
Bob,
Part of understanding a problem is to reproduce that problem. I offered a scenario that would allow you to see the issue and hand and you flatly refused. It would have taken you a minute to accomplish yet you want me to explain in detail an issue you could clearly see youself if you just? made a few mouses clicks. I have used setOpCode which is used? by new AbstractMRMessage instance. This is the center stone of the issue, if that does not trigger something nothing will as it is the heart of the issue. As a test engineer, my job was to help in the development of new products. This is reminiscence of those times. So to insure that the deliverable would be within the guidelines of JMRI it is certainly achievable. Do I need TMCC 2 working. Yes. Do I need it as part of the build no. In regards to your "Next steps are up to you, I think."? Its not up to me to convince you to open JMRI and run TMCC-2 commands. That's up to you.? Because I know if JMRI would issued this command ......F8 5F 72 FB 5E C0 FB 5E B2 a Legacy engine with the TMCC ID of 47 would announce "Stillwell Ave,Coney Island" I think I'm done with this discussion. Inobu? |
Inobu,
I think I'm seeing one of the fundamental differences in the user interface vs the commands. Your statements make me think many of the commands have predefined actions and that a loco may have more than one 'variable' value, like the speed is one variable value, and for a self-propelled crane, rotation would be another value. This is a concept I've been waiting to see show up somewhere, multiple value dependent things in a single loco. In my mind braking effort would be a second value example. Most current decoders we have do braking with toggling one or more functions to step the amount of braking. Really it could/should be a 0->100% braking value. Yes the current DCC standards don't have that concept. You only have one variable and a bunch of Boolean states to convent settings into the loco. Does this sound like one of the major concept differences you are seeing between how a common throttle and what a native TMCC2 throttle would have? Like how many buttons or dials do those throttles have? An explanation of that end of the physical interface might help us understand what might be missing in our program version of a throttle. -Ken Cameron, Member JMRI Dev Team www.jmri.org www.fingerlakeslivesteamers.org www.cnymod.org www.syracusemodelrr.org |
Jon Miller
¿ªÔÆÌåÓýOn 10/25/2019 6:21 AM, Inobu One via
Groups.Io wrote:
Start up a TMCC connection in simulation mode. Open the TMCC monitor and Send TMCC command windows. ??? JMRI was started by (Bob) to program decoders in plain English for DCC users back in the early days.? It has really expanded since then.? But it's roots are so the average Model Railroader can be a Model Railroad Engineer and not a software Engineer. ??? Remember there are a lot of Model Railroads still using DC
(or AC)! -- Jon Miller For me time stopped in 1941 Digitrax Chief/Zephyr systems, JMRI User SPROG User NMRA Life member #2623 Member SFRH&MS |
I¡¯m sorry you¡¯re frustrated by this. If you¡¯re done, you¡¯re done. No need to reply.
But there are people who really do want to help you if they could just understand what you¡¯re trying to do. I very much understand that complex commands need to be sent over the line. I¡¯ve written lots of code to do that. What I don¡¯t understand is why you seem to require that the command itself be surfaced through the throttle. Hence the question about what you mean by ¡°formulate the command via key strokes" I can¡¯t learn what you mean by that by doing experiments with JMRI. I know what that part of JMRI does; you¡¯ll notice my name at the top of the files you¡¯re modifying. I¡¯m trying to understand what _you_ want it to do. Bob On Oct 25, 2019, at 8:05 AM, Inobu One via Groups.Io <one2beros@...> wrote:-- Bob Jacobsen rgj1927@... |
Forgive my intrusion into this discussion, but I appear to be missing something.
Take a look at the manual: The controller has a lot of controls and includes a keypad that changes into different sets of icons which can trigger different features. Since the JMRI Throttle is based on DCC practices, it cannot handle the complexity of TMCC2. I believe the real challenge of supporting TMCC2 is designing the user interface. Translating interface events into TMCC2 messages is probably trivial and is no different than translating JMRI throttle events into NCE/Digitrax/etc. commands. Dave Sand |
Ken,
If you look back a few weeks ago? posted a link for the Lionels Hand Held throttle.? Look at the addressing Function ---- Those buttons control the Parameter index in the 3 word command format.? So the user will press different buttons that will create the command syntax. When the command word is completed the command string is sent out. If the user does not complete the 3 word command nothing is send. So to blow the horn, the ENG button is pushed setting up setOpCode F8, at that point the hand held will look for the address of the engine. The user will enter the ID. This TMCC ID will be appended to the command. Next the hand held will change the display from the digit pad to an icon pad. That icon pad will then allow the users to press the icon representing the command they wanted to execute. At that point the complete command is sent as the 9 hex code string. Note that the last hex value is a checksum that will be checked. That comment itself would be a trigger word as no checksum was written in TMCC-1.? The JMRI Throttle needs to have those Parameter buttons in order to construct the command. As of right now the TMCC commands are relegated to the function keys which are predetermined. That limits the users ability to access the full complement of commands. This whole bantering falls under the you don't know what you don't know. Every one thinks its ok because they don't know the full capabilities of TMCC-2. TMCC-2 runs rule 17 where the lights dim when the engine takes off......That is why I used the ground light as example. Some people don't know you can access them or know they exists. Performing the simple task I persented would have reveal the short coming.?? Inobu |