Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Technical support / Re: Custom Function Editing Window Issue
« Last post by support on December 11, 2019, 01:02:08 AM »
No it should be 32-bit JRE. I thought you may have installed 64-bit JRE which won't work properly.

For graphic card RTX2060 - unfortunately we don't have such a graphic card handy. If the graphic card driver screws up the display there is very little we can do on the Java source code side to mitigate it since it is not a programming issue but a glitch in the underlying interaction between the O/S, JRE and Java bytecode. Perhaps the glitch can be reported to the graphic card manufacturer to see if they have an updated driver software that will address the issue.

Meanwhile, you may want to keep the editing done on your laptop screen if it works well in the HD mode.
 
22
Technical support / Re: Custom Function Editing Window Issue
« Last post by DW_Microsys on December 11, 2019, 12:16:54 AM »
My laptop has HD LCD monitor build in. The 4K monitor is the external one.

It doen'st happen when I move window between two monitors, only happens when I try to scroll up & down or editing in the function window on 4k Monitor.

I'm using 32bit JRE. Do I need to install 64bit JRE?

I also suspect something to do with graphic card. I already tried to disable acceleration but no help.

Could you find the graphic card RTX2060 and test with it? It is a quite new graphic card.
23
Technical support / Re: TBASIC Input On/Off Question
« Last post by MatrixMan on December 10, 2019, 10:46:24 PM »
Thank you all for your help.  I am posting this in case someone needs help in the future with this.  Here is the final code I wrote that works exactly like I wanted:

rem 'First clear the value for GrndrTmr
TIMERPV[9] = -1
CLRIO GrndrTmr
Refresh
rem 'Determine if the switch is on (High) or off (Low) and set the timer value
IF TestIO(SWHigh)
    Then SetTimerSV 9, GetTimerSV(15)
Else
     SetTimerSV 9, GetTimerSV(16)
ENDIF
RETURN

This code, along with the ladder I attached, allows you to have a timer that you can change based on if a switch is on or off.   
24
Technical support / Re: TBASIC Input On/Off Question
« Last post by support on December 10, 2019, 06:28:10 PM »
Without fully understand your program, we would like to jump in with some comments about using SETTIMERSV - this command changes the Set Value of the timer when it is activated, but does not activate the timer when it is executed.

On Nano-10 and FMD PLC we don't recommend sprinkling this function all over your TBASIC program as the set value change are not backed up in flash memory unless specifically forced to do so by the program. Timers' and counters' are normally preset during program transfer but TBASIC allows you to perhaps use a HMI to make changes when needed, but it is not meant to be changed all the time by a program.

If you want to two different timer values for an action you could use two separate timers. Alternatively, you can start a timer with a desired count down value anytime by assigning the time-out value to the TIMER[n] variable and clearing the timer contact. You do not need to change its Set Value using the the SETTIMERSV command.  Please check the following FAQ thread for explanation:

https://triplc.com/smf/index.php?topic=1046.0
25
Technical support / Re: TBASIC Input On/Off Question
« Last post by garysdickinson on December 10, 2019, 04:28:06 PM »
Jeff,

I don't think that I can help you out of the hole you are digging. 

This is what I understand
  • Your original code was written in 100% ladder logic and apparently worked on a T28.
  • You swapped out the T28 for a newer, more capable PLC. 
  • The old code was ported to your newer PLC.  And operated correctly???
  • You tried to make a "small" change using ladder logic but you were not successful.
  • You then attempted to make the change using a custom function. And this didn't work.

Nothing in your custom function makes any sense.

My best advice at this point:
  • Delete your custom function.
  • Document exactly what the original PLC program does.  It is based on 2 "drum sequencers" using Seq1 and Seq2.  Figure out exactly what is controlled at each state.  Figure out exactly why and when the sequencers change state. Document all of the time delays.  Document all inputs/outputs.
  • Go back to 100% ladder logic and add the new feature.
          OR
    Now that you have fully documented the program and understand how it works, it should be easy to rewrite it.

Gary Dickinson
26
Technical support / Re: TBASIC Input On/Off Question
« Last post by MatrixMan on December 10, 2019, 08:14:19 AM »
Hi Gary,

Thanks again for your input.  It was very helpful.  I am still trying to get my densifier to change the grinder time depending on the position of the high/low switch.  The ladder code you gave me on the other posting didn't work.  There is just too much stuff going on at the same time and it caused other problems.  I got the TBASIC code to work.  Well, mostly.  I used the existing ladder code, but added some custom TBASIC to it.  See the attached ladder code.  The problem is that no matter what I type in TBASIC, it still saves that last value when you turn the switch on.  In other words, when you go from Low to High it runs the Low timer one more cycle and then runs the High timer from then on.  I tried changing the timer to 0.  Clearing the IO for that timer and refreshing.  It still does it.  What is weird is that the I/O table shows the correct values (I added pauses in for each step), but the simulator still holds that timer value one last time.  Here is what I wrote:

SetTimerSV 9,0
CLRIO GrndrTmr
Refresh
IF TestIO(SWHigh)
    Then SetTimerSV 9,0
          CLRIO GrndrTmr
Refresh
Else SetTimerSV 9,0
CLRIO GrndrTmr
Refresh
ENDIF
IF TestIO(SWHigh)
   Then CLRIO GrndrTmr
      Refresh
        SetTimerSV 9, GetTimerSV(15)
Refresh
Else CLRIO GrndrTmr
Refresh
     SetTimerSV 9, GetTimerSV(16)
Refresh
ENDIF
RETURN

I know it has a lot of overkill in it, but it still didn't work.  I am new to this so I am probably doing something wrong.  9 is GrndrTmr.  15 and 16 are the Low and High timers.  Thanks again for your help.  Take care.

Jeff
27
Technical support / Re: TBASIC Input On/Off Question
« Last post by support on December 10, 2019, 04:58:31 AM »
Hi Gary,

Thanks for the excellent explanation. We couldn't have done it any better than what you did.

Just add a note to someone new to TBASIC - the variables represented by INPUT[] and OUTPUT[] are stored in internal memory and they are normally only synchronized to the physical I/Os at the end of the ladder logic scan. So it will be a mistake to monitor an input inside a TBASIC loop because these internal memory do not change state:

E.g.
WHILE 1
   IF TESTIO(IN5) EXIT: ENDIF
ENDWHILE

The PLC program will be stuck in the WHILE loop because IN5 will never be turned ON.  You can force the internal I/O to be updated using the REFRESH statement:

WHILE 1
   IF TESTIO(IN5) EXIT: ENDIF
   REFRESH
ENDWHILE

REFRESH statement will update the memory INPUT[] to the states of the associated 16 physical inputs. There is a penalty of I/O scan time being used each time you run the REFRESH statement (about 2ms for a FMD or Fx PLC, shorter for Nano-10) so you want to use it only when necessary.  Letting the ladder logic monitor changes in input and use it to trigger custom functions for TBASIC processing will normally be a lot more efficient than monitoring it inside a WHILE loop.

28
Technical support / Re: Fx2424 PLC backwards compatible with T100MD2424
« Last post by support on December 10, 2019, 12:08:45 AM »
Fx2424 is NOT a drop-in replacement for T100MD2424. In most cases you can get by with small modifications if you want to use Fx2424 to replace T100MD2424+. Note the following differences:

1) Output 7 and 8 on T100MD2424 are PNP type (ON = 24VDC, OFF = 0V DC).  All outputs on Fx2424 are NPN types (ON = 0V, OFF = open circuit (with weak pull up to 24VDC)

2) On T100MD2424+ the Analog output 1 and 2 shared the pins with analog input 7 & 8.  On Fx2424 the analog outputs are on their own dedicated pins.

3) On T100MD2424+ the PWM channel 1 and 2 are on output 7 and 8.  On Fx2424 the PWM channel 1 to 4 are occupying output 5 to 8

4) On T100MD2424+ the high speed counters shared with input #3,4,5,6. On Fx2424 the high speed counters shared with input #1 to #6 (there is an additional high speed counter on Fx2424).

These difference may or may not be applicable to your applications, depending on whether you are using these features or output 7 & 8.

The exact same program that ran on the T100MD2424+ however can be compiled and transfer to the Fx2424. You just need to ensure that the special I/Os are wired to the correct terminals.
29
Technical support / Re: Custom Function Editing Window Issue
« Last post by support on December 10, 2019, 12:06:23 AM »
We have never encountered the issue you showed on your screen shot.

It is likely has something to do with the graphic driver.

You mentioned that the TRiLOGI screen display fine on your laptop screen. Does your laptop has 4K screen built-in or it is driving an external 4K monitor? Does it happen when you move the iTRiLOGI windows from your laptop screen to the 4K screen when resolution changed?

You may want to try to disable some graphic acceleration in graphics card as these sometime introduce incompatibility.

Are you using 32-bit Java JRE?

30
Technical support / Re: Custom Function Editing Window Issue
« Last post by DW_Microsys on December 09, 2019, 10:48:10 PM »
Here is a sample from my monitor, the function window is smaller than HD.
image located at https://ibb.co/X8S0srL
Pages: 1 2 [3] 4 5 ... 10