Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - support

Pages: 1 ... 3 4 [5] 6 7 ... 212
61
Technical support / Re: FMD1616 - Open Socket TCP as server(slave)
« on: March 19, 2020, 07:40:44 PM »
You can only specify the destination port, not the source port. The source port is assigned by the OS and incremented after every connect disconnect which comply to internet RFC. You can't fix the source port number.

FMD1616 PLC server socket is to service the iTRILOGI client. It can also service HTTP protocol commands sent from a HTTPRequest process. Please refer to Chapter 2.7 of the FMD User Manual for details.

62
Technical support / Re: FMD1616 - Open Socket TCP as server(slave)
« on: March 17, 2020, 12:21:15 AM »
Yes if the Linux server is listening on a TCP socket the FMD1616 PLC is able to using PRINT #4 "<TCPCONNECT ...>" command to connect to the server port and interact with the server.

63
Technical support / Re: FMD1616 - Open Socket TCP as server(slave)
« on: March 16, 2020, 03:39:06 PM »
The FMD1616 PLC server socket is always open. So you just need the client to connect to it. iTRiLOGI is a client that can connect to the PLC's server socket.

The TBASIC language does not have built-in support for user initiated UDP client connection to external UDP server. Only TCP client connection is supported.

64
Technical support / Re: Bit Shift
« on: March 10, 2020, 02:00:10 PM »
Attached is a sample program for using the LSHIFT function for multiple bits.

A parameter X that contains the number of bits is passed to the function fnLShiftXBit which then uses a FOR NEXT loop to shift X bits to the left.

Note:
We cascaded two relay channels so that the single bit will shift across both RELAY[1] and RELAY[2] - total 32-bits. You can change the number of channels to 1 if you just want the shift to happen within RELAY[1] and not moving into the higher RELAY[n] channels.


65
Technical support / Re: ADC not being read
« on: February 29, 2020, 08:33:44 PM »
So does DM[2] and DM[3] return value you expected or do they all return only zero?

Did you connect the voltage to ADC(1) and ADC(2). Note that ADC(1) is on the PIN 8 of the DB15 connector and ADC(2) is on the PIN 7 of the DB15 connector. Please make sure that you have applied analog voltage to the correct PIN on the DB15 connector.


66
Technical support / Re: ADC not being read
« on: February 28, 2020, 11:58:41 PM »
You need a program inside the PLC that run the ADC(n) function to read the value of ADC channel n.

The PLC does not want to waste CPU cycle to read ADC if it is not required in the program.

You can use a clock pulse such as 0.1s to drive a custom function. Inside the custom function you can write the following:

FOR I = 1 to 8
    DM = ADC(I)
NEXT

The ADC channel data will be read into DM[1] to DM[8] and their value will also be available on the online monitoring screen.

67
Technical support / Re: 16 BIT TO 32 BIT
« on: January 24, 2020, 12:10:58 PM »
Do you or anyone else know how to solve the issue of the simulator stopping and causing you to have to close down the software and reboot only for it to work for another 5 to 1o minutes. This only seems to happen on the computer with Windows 10 I never experienced this on my computer with Windows XP

We have been using Windows 10 for a few years already and do not experience simulator stopping issue. Do note that TRiLOGI is written to run on 32-bit Java JRE and does tend to encounter problems when it is running on 64-bit Java.

In the latest iTRiLOGI 6.6 and 7.2 the 32-bit Java JRE is automatically installed and invoked by the TL66.exe and TL32.exe.  If you have older version of TRiLOGI you may want to consider upgrading them which also resolves the problems that could be caused by incompatible JRE.  If the Java update does remove critical files on the 32-bit java then you need to re-run the SetupTL7.exe program to re-install the correct JRE.

Also whenever your PC prompt you to update the (usually 64-bit) JRE, make sure that if you are given an option, do not allow it to "search and destroy" older java on the PC. The 32-bit JRE installed in the TRiLOGI folder will only be used by TRiLOGI and would not affect your other PC program that may need to use the latest 64-bit JRE.

68
Technical support / Re: 16 BIT TO 32 BIT
« on: January 24, 2020, 12:01:57 PM »

I can think of 3 reasonable approaches:
  • Use the SetHigh statement to build a 32 bit variable in A:
    A = RELAY[2]
    SETHIGH16 A,RELAY[1]
  • Build a 32 bit variable in A
    A=RELAY[1] * &h10000            ‘ shift left 16 bits
    A=A | (RELAY[2] | &h0000ffff)   ‘ OR in least significant 16 bits
  • Take advantage of the fact that the DM memory can be accessed as both 16 bit and 32 bit values.  In "C-like" programming languages this is an example of a "union" data structure. This code will build a 32-bit value in DM32[1]:
    DM[1]=RELAY[1]
    DM[2]=RELAY[2]
Try them in the simulator. Pay close attention to where the bits from RELAY[1] and RELAY[2] end up in the 32 bit value.  Set the most significant bit of each group of relays and verify that you get the correct pattern in the 32-bit variable.

Gary Dickinson

Great answers to the question that Lorne posted, Gary!

The 3rd approach is very efficient but just need to remember that when DM32[1] is formed by two adjacent 16-bit DM[1] and DM[2], the upper 16-bit is contained in DM[1] and lower 16-bit is contained in DM[2] (known as the Big Endian representation).  So in order for the relay #1 to 32 to form a 32-bit number the correct assignment is as follow:

DM[2] = RELAY[1]  ' the lower 16-bit
DM[1] = RELAY[2]  ' the upper 16-bit
A = DM32[1]



70
Technical support / Re: Custom Function Editing Window Issue
« on: December 14, 2019, 01:34:29 PM »
The following links is a screen capture of an external 4K monitor connected to a 4K screen laptop with a GTX960M graphic card. Connection was via a HDMI cable.

https://www.triplc.com/smf/attachments/20191214/external4Kscreenshot.jpg

The i-TRiLOGI runs properly on either 4K monitors. We have tried different settings and font sizes on i-TRiLOGI and also mouse-over the buttons (see popup tooltip) but the function panels was never messed up like on your screen shot. 

Question - what display scaling did you use on your 4K monitor? We were using 125% and 100% scaling without any issue. Can you try with 100% scaling and see if it works for you?



71
Technical support / Re: Custom Function Editing Window Issue
« on: December 13, 2019, 03:32:00 PM »
You can change the font size of text in the Custom Function editor by pressing the F11 and F12 key, or hold down the "Ctrl" key and roll the mouse wheel. That should get you going for now until there is resolution.

We have developed the iTRiLOGI software on a 4K monitor and it has not shown any messing up of the windows so it is hard to conclude that there is a software problem - otherwise it should happen to every 4K monitor, not just a specific graphic card. We will try to test with other 4K monitors that we can get hold of to see if we can repeat your case, but do understand that it is not possible for us to chase every graphic card available on the market since 4K support on Windows is often a touch and go and is not officially supported by our software even though we have do what we can to make it simpler for 4K user.

72
Technical support / Re: Custom Function Editing Window Issue
« on: December 10, 2019, 05:02:08 PM »
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.
 

73
Technical support / Re: TBASIC Input On/Off Question
« on: December 10, 2019, 10:28:10 AM »
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

74
Technical support / Re: TBASIC Input On/Off Question
« on: December 09, 2019, 08:58:31 PM »
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.


75
Technical support / Re: Fx2424 PLC backwards compatible with T100MD2424
« on: December 09, 2019, 04:08:45 PM »
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.

Pages: 1 ... 3 4 [5] 6 7 ... 212