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.


Topics - ckane

Pages: [1]
1
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.  

2
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.


3
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.

4
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]