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 - jbryant87

Pages: [1]
1
Technical support / Re:Saving a CSV File
« on: November 20, 2018, 09:10:23 AM »
I have got this system working now using the TL Server software.

The only problem I can see with this is that I will need to install this on a customer server, and I can only find it paired with the full PLC program package.

Is there a way to get TL server as a stand-alone. Or can I use another piece of software such as FileZilla to do the same thing?
If using something like FileZilla will the command be the same?

Thanks in advance

2
Technical support / Saving a CSV File
« on: November 12, 2018, 03:51:43 AM »
I need to create and save a CSV file onto a network connected PC using an FX1616BA PLC

Now i have never done anything like this before so i dont even know where to start with the commands.
What i am trying to do is the following:

1. Create a file, the filename will be the value of dm[100] (MAN SERIAL)
2. take data from registers then save them to the CSV file eg>
dm[102] = "SERIAL NO1"
dm[103] = "SERIAL NO2"
dm[104] = "SERIAL NO3"
dm[105] = "RESULT1"

CSV file will look like this:

MAN SERIAL, INLET "SERIAL NO1", FILTER "SERIAL NO2", OUTLET "SERIAL NO3", LEAK RESULT "RESULT1, "TIME" , "DATE"

Is this something that can be done?

3
Technical support / DM32 Problem
« on: October 26, 2018, 06:09:52 AM »
I am sending a 32bit unsigned integer from a weintek HMI to a FX1616ba to location 4x1001 (dm[1])
The data is being sent as part of a recipe transfer. So 2 words will be sent.
I dont think the words are overflowing correctly as the numbers im seeing dont make sense

eg. sending 985 from HMI, dm32[1] reads 64552960 but dm16[1] reads correctly

sending 95674 from the HMI, dm[32] reads 1975123969
dm16[1] reads 30138 dm16[2] reads 1
Is there a conversion i can do to get these numbers to make sense?




4
Technical support / Re:week number
« on: January 09, 2018, 09:25:46 PM »
I was aware of the inacuracy of the leap year calc.
I suppose the better way to caculate would be below:

If (DATE[1] MOD 400)&(DATE[1] MOD 100)&(DATE[1] MOD 4)|(DATE[1] MOD 400)&(DATE[1] MOD 4)

So if the date is divisible by 400 and 100, or 4 and 400.

Not that ill be around to see this work, but it works in the simulation

5
Technical support / PRINT #4 Shutting down
« on: January 09, 2018, 07:06:04 AM »
I use the below code to allow a leak test device to print data into strings to evaluate.
The device will send several lines, but the PLC will shut down the port after recieving the first line.
is there a way to keep the port open and recieve all the data?
This is the code used below:

G$=""
J$=""
G=0
H=0


while G=0 and H<20
   PRINT #4 "<TCPCONNECT 192.168.100.004:10001>"
   J$=""
   DELAY 200
   if status(3)=1 then
      I=0
      while G=0 and I<=20
         delay 200
         J$=INPUT$(4)
   if len(J$)>0 then
            G=1
           G$=J$
endif
I=I+1
endwhile
ENDIF
PRINT #4 "</>"    ' close connection before reconnecting
H=H+1
   '
IF G=0 THEN
DELAY 500
ENDIF
endwhile

6
Technical support / Re:week number
« on: January 08, 2018, 11:25:00 PM »
Thbaks for the reply.

I also did some digging and found a calculation for the ISO week number using the ordinal date and day of week.
I converted to work in trilogi and it workly just fine.
It also allows for the leap year.
  Code below for reference

'PUT DATE IN M$
M$ = STR$(DATE[1])
'DIVIDE YEAR NUMBER BY 4
M# =VAL(M$)/4.0
'PUT NUMBER INTO STRING
N$ = STR$(M#)
'PUT FIRST DECIMAL PLACE INTO O$
O$ = MID$(N$,6,1)
'IF DECIMAL IS ZERO, THEN SET LEAP YEAR
IF VAL(O$) = O THEN
SETIO LEAP_YEAR
ELSE CLRIO LEAP_YEAR
ENDIF
'CALCULATE ORDINAL DAY
IF (DATE[2])=1 THEN P=0 ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=2 THEN P=(DATE[3]+31) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=3 THEN P=(DATE[3]+59) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=4 THEN P=(DATE[3]+90) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=5 THEN P=(DATE[3]+120) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=6 THEN P=(DATE[3]+151) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=7 THEN P=(DATE[3]+181) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=8 THEN P=(DATE[3]+212) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=9 THEN P=(DATE[3]+243) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=10 THEN P=(DATE[3]+273) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=11 THEN P=(DATE[3]+304) ENDIF
IF TESTIO (LEAP_YEAR) = 0 & (DATE[2])=12 THEN P=(DATE[3]+334) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=2 THEN P=(DATE[3]+31) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=3 THEN P=(DATE[3]+60) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=4 THEN P=(DATE[3]+91) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=5 THEN P=(DATE[3]+121) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=6 THEN P=(DATE[3]+152) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=7 THEN P=(DATE[3]+182) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=8 THEN P=(DATE[3]+213) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=9 THEN P=(DATE[3]+244) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=10 THEN P=(DATE[3]+274) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=11 THEN P=(DATE[3]+305) ENDIF
IF TESTIO (LEAP_YEAR) = 1 & (DATE[2])=12 THEN P=(DATE[3]+335) ENDIF

'ORDINAL DAY + CURRENT DAY
Q = P + (DATE[3])
'RESULT MINUS DAY OF WEEK NUMBER * 10
R = (Q - (DATE[4])) + 10
'RESULT DIVIDE BY SEVEN, ROUNDED NUMBER IS WEEK NUMBER
S = R/7
S$ = STR$(S,2)

7
Technical support / week number
« on: January 04, 2018, 12:40:55 AM »
Does anyone know of a quick method of using the RTC to generate a week number 1-52?

8
Technical support / Display issues
« on: February 19, 2017, 07:24:42 AM »
I have some long rungs in my program and i-TRILOGI 6.51 cuts the right hand side of the screen off, it is impossible to select anything after the cutoff.
The only way to select a coil is to delete some on the rung, change it, then put the rung back in.
Has anyone else seen this issue. I have attached a pic to show the problem
I am running wondows 10 on a HP elitebook.
Also does anyone else have a strobe effect whenever online monitoring, and is theere a way to fix this

9
Technical support / Re:DM TO ASCII
« on: February 04, 2017, 11:41:48 PM »
Genius!

That works perfectly, and has saved me alot of work.
I was thinking i might need to send the ascii in unicode which would cost me twice as many DM's which i hadnt allowed for.

Thanks for the help

10
Technical support / Re:DM TO ASCII
« on: February 04, 2017, 12:59:36 PM »
Thanks for the quick response.
I have input the code into a custom funtion and I am getting some strange results.
For example if I write HELLO into the registers, then DM116 = 17736, DM117 = 19532, DM118 = 79
A$ reads (CHINESE CHARACTER)E(CHINESE CHARACTER)LO

Any Ideas?

Thanks in advance

11
Technical support / DM TO ASCII
« on: February 04, 2017, 07:46:05 AM »
I am trying to convert the information contained in data memorys back into ASCII
My HMI sends an ASCII code 20 characters in length into 10 data memory locations in the PLC (DM116 - DM125)
There should be 2 ASCII characters contained in each data memory but I can only retrieve 1 from each.
Using A$ = CHR$(DM[116]) i can get the first character but cannot retrieve the second.
Is there a method of converting the 10 words back to ASCII, reassembling them, and putting them into A$

Failing that can i simply send the ASCII data directly into A$ using MODBUS?

Pages: [1]