0

Text Memorising Channel

Julian Robinson 4 years ago in IQANdesign updated by Pierre Fagrell 4 years ago 14

I need some assistance please.  I want to memorise text from the J1939 TPIN, so they when the key is off (ie no J1939) then he text is preserved and disaplyed on the MD4-7 all the time.

The only way I can figure out to get the TPIN value into the Memorising channel is by using a state parameter channel first (SP) as this only accepts states for the text values.  Then I can get the text into the Memorising channel.  I use a IDC channel that looks at the PGN OK status to trigger the Memorising channel to Qreplace.  This stratey works fine for numbers, but not for text

BUT anytime the PGN in frame times out (ie key off), then all the text values go to blank including the Memorising channel, through that entire signal chain.  If I disable the Timeout on the PGN input, then it works, but the project now has yellow warnings for no Timoueouts and this is a messy solution.  

Can anyone please advise how to get J1939 TPIN values Memorised when the datalink is off (and all messages timeout)

Thanks

Julian

Just wanted to add more details.  The Memorising function works fine with normal text values..but this issue is when I want to use text as collected from TPIN over J1939.  This is relarted to the PGN CI (component ID) where ESN and UNIT etc are collected as text (ie the OEM name, unit numbers, engine type etc).  

Thanks

Please post a screenshot of how the IN channels look when the text is correct and when it is empty.

There is probably something that can be used to trigger Qreplace for example with PositiveEdge.


Thansk for replying.

Above:  This is the case when the PGN has timed out. The values in the TPIN go blank, the values in the state parameter go blank and for some strange reason the Memorising channel goes blank as well...and does not show its value.  The Memorising channel is triggered to Qreplace only when the PGN Status = OK rising flank is true. (ie the datlink is connected and Status=OK (no timeouts etc.).  The only way I could figure out how to get the PGN TPIN text into the Memorising channel was by using a state parameter channel first, as the Memorising will not accept this directly for some reason.  is this the problem?

Here the PGN is powered and shows a text value (it just happens to be a number, but its formatted at text as its taken from the System Information channel from another MC41 module (Project Version) and sent over J1939 to this module.  they are not linked by Diagnostics Can as they are different projects altogether..

Thanks

Julian

Can get some help here please???  This is aproblem I ned to solve ASAP...thanks

There must have been a cycle when PGN State OK was true and the TPIN was empty, you could see it by doing a measurement.


I would try to add a check in Qreplace if the TPIN text is empty, and/or add a small delay on to PGN State OK.


HI there.


I am still having issues with this PGN TXT into a Memorising Channel issue.  It feels like a bug to me.

I have tried eveything I can think of.  From my observations, the Memorising channel is not using any logic to to decide to Qreplace/Qadd etc.  The value from the State Parameter Channel goes directy to the Menmorizing channel regardless of the logic.  I have tried both Qcode and Object lists, I have put logic and time delays on the TPIN channel, I have even mode no logic to Qrplace etc.  The Memorising channel seems to only use what ever the SP channel is showing.  This is very frustrating.  


Can you perhaps try and create a solution and share?  I want to take the Text from a J1939  PGN ie CI or similar (multipacket) into a Memorising channel. So that txt such as Engine Serial Numbers/Unit Numbers etc are memorised when the power to the IQAN system is cut.   However this can be done..

If you could help me please I would be very grateful..

Thanks

The trick is to use the SPN that is being sent aswell, then you get the correct value and there is no risk of it being empty. Do the check on the final memory channel or array that stores the value.

For example on the channel that store the value "0.24" above:

if FCM SPN = 60404 then Qreplace

Thanks - but I tried this already as well.  The problem seems to be that the SP channel, goes to default value when the PGN is Status Not evaluated" and the Memorising channel takes this value instead.  I have also added logic into the default value state in the Memorising channel, to also not repalce if these is no PGN/SPN valid.  It seems the Mem channel just does not process the Qrepalce logic when these SP are used with txt.

Can you maybe try this on your own verion of IQEN design?  I have 6.05.18 by the way.  Running on the MC43-FS

What logic are you using in your IDC "PGN Status OK"?

I would typically use logic that looks for the message updating:  example:

      Result:= PGN 65280     

where PGN 65280 is the JFIN channel in question.

This way the memorizing channel is only triggered on a message update with no regard to a timeout condition that would force the JPIN channels to their default values.  The "Result" in the IDC will only be true for the execution loop that the message is received.  As long as the Tx interval of the given PGN as at least twice as long as the cycle time, the "Result" will always reset to False, so as not to continuously trigger your memorizing channel.

Hi mike, thansk for the reply.

I have used all forms of logic and notthing seems to work.  I have several other places in my confiuration where this type of Memorising is required:  So maybe I go back to the start and descibe the main issue.

Goal:  I want to take the J1939 CI (PGN 65259) and extract ESN and Unit etc as TPIN.  CI is a multipacket PGN that uses TCP protocol etc, RQST only.  These SPNs are TXT vaules, not numbers.  They represent the txt inputed into the engine ECM for engine serial numbers, unit descriptions, manufactured etc.  This all works fine (after a bug was fixed on the multipacket reading from IQAN a few revisions back).

Then I want to save these TXT values to a Memorisign channel, so that when the IQAN system is powered down, then the TXT is not lost.  Without this, the values go blank until the next PGN CI is recorded from the datalink. 

Now, Memorising channels DO NOT accept TXT imputs. So the TPIN from the PGN is not a direct input.  They only accept SP, Integers, Digital, etc.  No TPIN, or Text Formatting channels.

The only way I can find, is to read the TPIN into a State Parameter channel. There is no logic possibiliby within the SP channel to make a Result:=, or any other calculations, this  is purley reading the name of the TPIN fromt  the PGN based on Sate X value (I have 2x states)  ie direct read from J1930 TPIN or Manual TXT entry via the Adjustment (Text Parameter Channel).

Now, when the system boots up and there is no value for the J1939 PGN, then the State Parameter channel shows nothing (blank) and then the Memorising shows blank (nothing).  As soon as the PGN arrives, then the SP and the Mem take values.  This is completely independant from any argument in the Mem channel (ie if xxxxxx = true then Qrepalce.  I have made 100s of attempts at this xxxx argment.  it appears from observation, that the Mem channels is ignoring this "Qreplace" argument and just using what ever value the SP channel has (even a blank value.  So there is not a repose from any logic to try and stop the Mem channel replacing its value based on the status of the PGN/SPN or any other ditial parameter I create. 

Can anyone reproduce this setup and advise if this is a bug, or am I asking too much of the Mem channels.

PGN 65259 -> TPIN ->  Memorising channel (then recycle the power to IQAN and see what happens.


I am using 6.05.18 and MC43 on this logic.

Thanks

Julian

Aha, now I think I see the problem, you are actually saving the state parameter in the memorizing channel, not the SPN.

An SP is just an integer number, which is why it is possible to save in the memorizing channel. After reboot the memorizing channel will just contain a small number like 0 or 2.

If you really want to save text I think you could make a workaround by using JPIN and actually saving it as integers in one or several memorizing channels depending on how many bytes it is. Then it will be a challenge to convert back to text... See this discussion:

https://forum.iqan.se/en/communities/1/topics/2378-text-to-integer

Maybe your MC43 can send the stored integers out as JPOUT, and the MD4 receives them as TPIN

Do you have the "Store value" property in the memorizing channel set to "Yes"?  If it is set to "No", then upon powerup that memorizing channel will assume an initial value of the "Reset value" (default value is zero).

Have you tried restricting the "QReplace" command to only execute if the input value is not equal to zero?

HI Mike

Yes and Yes.

In fact if have tried litterally 100's of arguments for the Qreplace basd on PGN and SPN and TPM and SP satatus.  All have no effect.


The Mem parameter seems to ignore this completely regardless of its logic. The vlaue fromt he TPIN goes striaght to the Men channel and is seemgly not affected by the Qreplace logic. THis is what I was outlining a few comments back.  If its s a TP, then no problem, it all works.  f the input is from the TPIN, then its not working.

Thanks

Julian

+1

It is working, but not as you expected.

When the input is the TP, it does not save the text from the TP inside the memorizing channel, it only saves "State = 1" which then points to your TP. After reboot it will point to the TP again and that still has text.

When when the input is the TPIN, it does not save the text from the TPIN, it saves the state number that points to the TPIN for example "State = 0".

After reboot it will still point to the TPIN, but since that is empty the result will be empty.