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

Pages: [1]
1
Technical support / Re:Custom Function
« on: June 18, 2012, 12:33:03 PM »
attached is code and ladder

2
Technical support / Re:Custom Function
« on: June 18, 2012, 11:34:56 AM »
The motr I am turning off is not the stepper motor, it is another motor with a normal start stop function.

3
Technical support / Re:Custom Function
« on: June 18, 2012, 11:34:01 AM »
STOP is an input.  Normally open pushbutton

4
Technical support / Custom Function
« on: June 18, 2012, 10:57:12 AM »
I have the following code in a function.

SETLCD 1,1, STR$(CtrPV[1])
if CtrPV[1] = 0 then
   SETLCD 2,2, "Here"
   SETIO stop   
   stepmoveabs 1,0,5  'goto home position
   'CLRIO stop
   call Init  ' initialize all variables
   'CLRIO stop
   return
endif

stepmove 1, C, 4

The problem I am having is the SETIO stop operates the input so the motor stops, but I cannot turn that back off, even with a CLRIO stop.  

I want simulate the momentary action of the pushbutton to turn the motor off.  

5
Technical support / Behavior problem
« on: June 17, 2012, 06:36:57 PM »
I see different behavior when Simulating and when Monitoring the Nano PLC

Not sure what is happening.
 ???
I have attached the code as well as a doc as to what I want.  Any assistance would be appreciated, since I am new to all of this.


6
Technical support / Re:Momentary Relay operation
« on: June 10, 2012, 08:24:59 AM »
As an update, I can call the function, but what I really want to do is emulate the push button.  I have stanard start/stop circuit with manul buttons, but I want to program the stop input.  So when the process completes, I want to emulate pressing the stop button.


7
Technical support / Momentary Relay operation
« on: June 10, 2012, 08:04:50 AM »
Newbie here.

Using a custom function, how does one operate a relay on a momentary basis?  I want to emulate the function of a momentary push button.  

For example, I have an INIT Input which is a manual push button, but I want to either programmically operate a relay contact in parallel with the input or call the custom function that this input operates.

8
Technical support / Re:problem with ModBus
« on: August 11, 2011, 12:33:54 PM »
2011-08-11 14:32:38.858 ? 0A 10
2011-08-11 14:32:38.874 ? 00 0F 00 01 02 00 00 D5 9F
2011-08-11 14:32:38.905 ? 0A
2011-08-11 14:32:38.920 ? 10 00 0F 00 01 "0" B1
2011-08-11 14:32:39.170 ? 0A 10 00 10 00 01 02 00 00 D7 F0
2011-08-11 14:32:39.217 ? 0A 10 00 10 00 01 01 "w"
2011-08-11 14:32:40.792 ? 0A 04 00 0B 00 01 "As"
2011-08-11 14:32:41.214 ? 0A 04 00 0B 00 01 "As"
2011-08-11 14:32:41.635 ? 0A 04 00 0B 00
2011-08-11 14:32:41.650 ? 01 "As"
2011-08-11 14:32:41.994 ? 0A 03
2011-08-11 14:32:42.009 ? 00 00 00 0E C5 "u" 0A 03 1C ":" 9A
2011-08-11 14:32:42.040 ? 00 AE 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 01 00 03 07 D0 00 00 00 "4" F7 DD
2011-08-11 14:32:51.884 ? 0A
2011-08-11 14:32:51.900 ? 04 00 0B 00 01 "As"
2011-08-11 14:32:52.321 ? 0A 04 00 0B 00 01
2011-08-11 14:32:52.336 ? "As"
2011-08-11 14:32:52.758 ? 0A 04 00 0B 00 01 "As"
2011-08-11 14:33:03.007 ? 0A 04 00 0B 00 01
2011-08-11 14:33:03.022 ? "As"
2011-08-11 14:33:03.444 ? 0A 04 00 0B 00 01 "As"
2011-08-11 14:33:03.865 ? 0A
2011-08-11 14:33:03.880 ? 04 00 0B 00 01 "As"

9
Technical support / Re:problem with ModBus
« on: August 11, 2011, 12:00:20 PM »
latest capture at 9600 baud

10
Technical support / Re:problem with ModBus
« on: August 11, 2011, 10:53:00 AM »
Have increased time, respons is around 200 ms.  

see code mods below.  always getting an error on the first modbus read.   Modscan works, just great with the slave.


INIT FUNCTION
SETBAUD 2, &H09   ' 115.2K, 8N1
SETSYSTEM 6,4  ' MODBUS RTU
SETSYSTEM 25, &H0101  ' A/O 1 SET TO 5 VOLTS
SETSYSTEM 25, &H0201  'A/O 2 SET TO 5 VOLTS
SETPROTOCOL 3, 10  '
SETSYSTEM 1, 4
SETLCD 1,1, "INIT FINISHED"

GETDATA FUNCTION

SETLCD 1,1, "                     "
SETLCD 4, 1, "Time: " + STR$(TIME[1]) + ":" + STR$(TIME[2]) + ":" + STR$(TIME[3])
A=READMODBUS(12,10,11)  'READ DATA ON PORT 3 AS A MASTER RTU SALVE 10 ADDRESS 11
'A = 2048
IF STATUS(2) = 0
SETLCD 3, 1, "ERROR MODBUS"
RETURN
ENDIF
SETDAC 1, A ' SET DAC 1 (A/O 1) TO READ VALUE
SETLCD 1, 1, "Set 1 Gamma = " + STR$(A) ' SHOW VALUE ON DISPLAY
'DELAY 200   ' DELAY 200 MS
B=READMODBUS(12,10,12)  'SAME AS ABOVE
'B= 2048
SETDAC 2,B
SETLCD 2, 1, "Set 2 Gamma = " + STR$(B)

11
Technical support / Re:problem with ModBus
« on: August 11, 2011, 09:18:50 AM »
Above message with just the port monitor connected to the 485 on the PLC.  Below I have the port monitor in parrel while tlaking to the slave.

2011-08-11 11:03:04.472 R 0A 04 00 0C 00 01 F0
2011-08-11 11:03:04.488 R B2
2011-08-11 11:03:04.878 R 0A
2011-08-11 11:03:04.894 R 04 00 0C 00 01 F0 B2
2011-08-11 11:03:05.362 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:05.767 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:06.173 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:06.688 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.078 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.483 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.780 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:08.185 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:08.589 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:09.079 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:09.479 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:09.879 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:10.380 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:10.770 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:11.176 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:11.675 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:12.065 R 0A 04 00 0C 00 01 F0
2011-08-11 11:03:12.080 R B2
2011-08-11 11:03:12.486 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:12.798 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:13.188 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:13.594 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:14.093 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:14.483 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:14.888 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:15.388 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:15.778 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:16.183 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:16.682 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.072 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.478 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.806 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:18.196 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:18.601 R 0A 04 00 0B 00 01 "As"
 

12
Technical support / Re:problem with ModBus
« on: August 11, 2011, 09:07:20 AM »
captured 485 port and this is what I see.

2011-08-11 11:03:04.472 R 0A 04 00 0C 00 01 F0
2011-08-11 11:03:04.488 R B2
2011-08-11 11:03:04.878 R 0A
2011-08-11 11:03:04.894 R 04 00 0C 00 01 F0 B2
2011-08-11 11:03:05.362 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:05.767 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:06.173 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:06.688 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.078 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.483 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:07.780 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:08.185 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:08.589 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:09.079 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:09.479 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:09.879 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:10.380 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:10.770 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:11.176 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:11.675 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:12.065 R 0A 04 00 0C 00 01 F0
2011-08-11 11:03:12.080 R B2
2011-08-11 11:03:12.486 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:12.798 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:13.188 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:13.594 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:14.093 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:14.483 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:14.888 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:15.388 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:15.778 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:16.183 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:16.682 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.072 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.478 R 0A 04 00 0C 00 01 F0 B2
2011-08-11 11:03:17.806 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:18.196 R 0A 04 00 0B 00 01 "As"
2011-08-11 11:03:18.601 R 0A 04 00 0B 00 01 "As"

13
Technical support / Re:problem with ModBus
« on: August 11, 2011, 08:41:01 AM »
Slave is decimal 10
changed protocol to 3, 10

I have flipped the wires on the 485 and still no correct data back.  

14
Technical support / problem with ModBus
« on: August 11, 2011, 06:04:57 AM »
I am using a FD88 and this is my first experience programming any PLC.  I am using the PLC as a ModBus Master RTU and wish to read two MODBUS registers from a Slave and then set those values to the two analog outs.  

I can communicate with the slave via my computer using MODSCAN, so I know the slave has the right baud rate, etc.( 8N1)

All seems to work except the MODBUSREAD.  I am getting no data back.  The LEDS by the 485 port never blink.

Suggestions Please -

Only have two circuits and two cusotm functions as below.

Custom Function INIT - runs on first scan


SETBAUD 3, &H09   ' 115.2K, 8N1
SETSYSTEM 6,4  ' MODBUS RTU
SETSYSTEM 25, &H0101  ' A/O 1 SET TO 5 VOLTS
SETSYSTEM 25, &H0201  'A/O 2 SET TO 5 VOLTS
SETPROTOCOL 3, 1  'PROTOCOL OF COMM3 SET TO MODBUS RTU


Custom Function GetData - runs off timer every 1 second

A=READMODBUS(13,10,11)  'READ DATA ON PORT 3 AS A MASTER RTU SALVE 10 ADDRESS 11
SETDAC 7, A ' SET DAC 7 (A/O 1) TO READ VALUE
SETLCD 1, 1, "Set 1 Gamma = " + STR$(A) ' SHOW VALUE ON DISPLAY
DELAY 200   ' DELAY 200 MS
B=READMODBUS(13,10,12)  'SAME AS ABOVE
SETDAC 8,B
SETLCD 2, 1, "Set 2 Gamma = " + STR$(B)
SETLCD 3, 1, "Date: " + STR$(DATE[2]) + "/" + STR$(DATE[3]) + "/" + STR$(DATE[1])
SETLCD 4, 1, "Time: " + STR$(TIME[1]) + ":" + STR$(TIME[2]) + ":" + STR$(TIME[3])

Pages: [1]