Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Technical support / Re: Custom function
« Last post by support on April 13, 2020, 10:01:37 AM »
This email reply to you was provided to support for this thread:

The best way is to use the STEPMOVEABS and STEPCOUNTABS commands to change and measure position around a fixed point. What you would do is move your motor to a position you would like to call zero and run the STEPHOME command.

From there you can move forward or backward using STEPMOVEABS and return the count from your zero position using STEPCOUNTABS. If you want to define a "home" position as 1000, then you can use define variables to create constant or variable values with names relevant to you (anything allowed by the define table naming conventions), and then use these as parameters for the STEPMOVEABS command.

STEPMOVEABS 1, HOME_1000, 1

It will be even more accurate if you can provide position feedback from your stepper driver to the PLC HSC inputs. STEPCOUNTABS will account for the pulses sent out of the PLC outputs, but it can't know about the actual physical movement, which requires encoder feedback from the driver itself.

The only problem is when the PLC loses power and you don't know for sure what the position of the stepper motor is when it powers up. You can always store position and home values in permanent memory, but the motor could have physically moved after power is lost and the PLC obviously can't detect that, so your power up position will be different than expected (the same problem will exist with any additional stephome command to support your request.

To resolve the issue of position loss when the PLC is powered down, you can add limit switches to zero the motor on power up and then use my solution to create fixed or dynamic home positions.

Here is a description of the STEPMOVEABS command, which you can also view online:

http://www.triplc.com/TRiLOGI/Help/tbasic/stepmoveabs.htm

------------------------------------------------------------------------------
STEPMOVEABS ch, position, r 

Purpose
   

This new command allows you to move the stepper motor # ch to an absolute position indicated by the position parameter. At the end of the move the relay #r will be turned ON. position can be between -231 to +231 .(i.e. about ± 2 x 109) steps. The absolute position is calculated with respect to the last move from the "HOME" position. (The HOME position is set when the STEPHOME command is executed). The speed and acceleration profile are determined by the STEPSPEED command as in the original command set.

This command automatically computes the number of pulses and direction required to move the stepper motor to the new position with respect to the current location. The current location can be determined at any time by the STEPCOUNTABS( ) function.

Once STEPMOVEABS command is executed, re-execution of this command or the STEPMOVE command will have no effect until the entire motion is completed or aborted by the STEPSTOP command.

See Also
   

STEPMOVE, STEPCOUNT( ), STEPCOUNTABS( ), STEPSPEED, STEPSTOP, STEPHOME

 ------------------------------------------------------------------------------
12
Technical support / Re: Custom function
« Last post by artkraft on April 12, 2020, 06:20:37 AM »
The 9999,90 is a mistake in the post only. It does run the drill up but not down. Is it possible to run the drill up and then down within 1 function. Would it work with the RFEFRESH and TESTIO removed.
13
Technical support / Re: Custom function
« Last post by support on April 11, 2020, 03:06:09 PM »
Some issues:

STEPMOVE 1, DrillSteps, 9, 9999, 90  - too many parameters

Note that when you run the STEPMOVE1 command it does not block execution of the program. The PLC setup the parameters for the interrupt service routine to handle the stepper motion so if you are testing for a "Drill Complete" flag right after running the STEPMOVE command it will never work since it takes time for the stepper motor to complete the motion.

The Drill complete flag will be turned ON when the move it complete so you can use it to run a function to decide what is the next step to do after the move is completed.
14
Technical support / Custom function
« Last post by artkraft on April 11, 2020, 12:23:56 PM »
Compiles correctly but won't work.

STEEPSPEED 1, DrillRate, DrillAccel
STEPMOVE 1, DrillSteps, 9, 9999, 90  //flag 9 = DrillComplete
REfRESH
IF TESTIO (DrillComplete)
THEN
STEPSPEED 1, 9999, 90
STEPMOVEABS 1, 0, 13
ELSE ENDIF

I do have a working program calling a second CusFn for the Stepmoveabs using flag 9. However when a stop command is used
we never know where the drill is. The goal is to make the drill cycle up and then down with 1 cusFn. Can't get the then, goes up not down.
15
Technical support / Re: How to communicate with server (Nano10)
« Last post by garysdickinson on April 03, 2020, 12:36:00 PM »
The Nano-10 has built in support as a slave device via Modbus TCP/IP.  This is an industry standard communication protocol.  A server can access the PLCs, INPUTs, OUTPUTS, RELAYS, DM[], DM32[] and several other PLC internals.

This is how most HMI devices interact with PLCs.  This is how remote data logging is done with PLCs.

Modbus TCP/IP requires little or no software support in the .pc6 program for the Nano. If your server can act as a Modbus TCP/IP server then most of the programming is on the server end.

This is not the only approach that you can use, but it is my favorite. 

Gary Dickinson
16
Technical support / How to communicate with server (Nano10)
« Last post by kirk-wgt on April 02, 2020, 02:24:49 PM »
Apologies for any dumb questions; I'm new to this.

We've got a Nano10 connected to a few devices via RS485.  Across the internet, I've got a server application that needs to:
- Know when certain inputs on the Nano10 have changed
- Tell the Nano10 to set/clear certain outputs

Let's assume that routing & firewalls are figured out so that both the Nano10 and Server are able to reach each other.

In a perfect world, I would keep a permanent socket connection between the device and my Server application, where I could easily peek, poke, poll, etc.
Is that possible?  If yes, what protocol/technique do I use for this?  FWIW I prefer a device-initiated connection but Server-initiated also works.

If this model doesn't fit how the Nano10 ideally operates, then what's the next-best technique to accomplish my goal with minimal latency or connection hassles?
17
Technical support / Re: permanently latched input
« Last post by gillecaluim on March 28, 2020, 08:05:03 AM »
Never did anything to the SmartTILE-fx board.  I've already ordered another FX1616-BA because I need to get this HVAC equipment back to a functional status.  I'll email for an RMA.
18
Technical support / Re: permanently latched input
« Last post by support on March 28, 2020, 12:19:22 AM »
Did you ever remove the SmartTILE-Fx CPU board from the carrier board previously?

It sounds like the SmartTILE-Fx board may have suffered some damage.

However, the best way is to request for an RMA (email support@triplc.com) and ship the PLC back to our office for testing. It is likely to be repairable unless there was catastrophic damage to the board.

Please include your company name and contact person name when contacting us. Some explanation of what the PLC underwent would be helpful for diagnosis.
19
Technical support / permanently latched input
« Last post by gillecaluim on March 27, 2020, 09:32:17 PM »
I have a FX1616-BA.  The DIO channel led #14 remains lit, even without any input and DIO #14-16 don't properly sense any input.  I've reset the board but nothing seems to fix this problem....is the board toast?
20
Technical support / Re: FMD1616 - Open Socket TCP as server(slave)
« Last post by support 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.
Pages: 1 [2] 3 4 ... 10