Jump to content

s.pratt

Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by s.pratt

  1. Thank you, but it is possible to use directly DT, but in last version of Unistream you can choose type of input DT then in C code is automatically generated this structure:

    typedef struct

    {

      unsigned int BufferPointer; // BufferPointer

      unsigned int EntrySize; // EntrySize

      unsigned int Number_of_rows; // Number of rows

      unsigned int Signature; // Signature

      char Status; // Status

      char PadUInt[3]; // PadUInt

    } Data_Table_Indexed; // Data Table: Indexed

    but I do not know what to do with these members of the structure( I know C programming very well and I can work with structures etc.) . I mean how to get data from that. I tried to read from all, I tried to write one of them then read from the others etc...,  but I have got just garbage values...

    Please e-mail into support@unitronics.com for more information on this topic.

     

    As far as I am aware, this type of input for a C function is only to configure a data table.  But I do not believe it will allow you to read/write from a specific data table.

  2. Hello,

     

    I don't believe you can address the data table directly in the C function.  You would have to perform a 'read row from DTI' to put the row information into a tag.  Then pass this tag (which will be a struct) into your C function.

     

    It is important to note that when passing the struct into a subroutine, the struct will update with each scan since it is a passed in by reference.  You will not have to pass the struct back out - it will be updated as it moves through the subroutine.

     

    Hope this helps.

  3. The driver is a Lin Engineering R1025 with just step and direction inputs, there's no serial or other communication interface.

    Hello,

     

    The relay outputs have about 100,000 cycle lifespan - they are not recommended to be used as pulse outputs.  I would recommend switching to a unit that has high-speed outputs.

     

    I would suggest one of the following part numbers if you wish to continue with the V130:

         - V130-TR20

         - V130-TR34

         - V130-TR6

         - V130-TRA22

     

    The TRA22 will most closely relate to the model you have now, it just has 4 relay outputs and 4 high-speed outputs compared to 8 relay outputs that you have now.

     

    Hope this helps.

  4. Hello,

     

    If you put the controller into "STOP MODE", you should be able to program a new application into the unit.

     

    -Detach power from the PLC

    -Press and hold your finger on the screen

    -Apply power while your finger is still on the screen

    -Once the unit is powered on, tap once on the screen

    -After the 10 second time-out, it should enter STOP MODE

    -Establish communications with VisiLogic (remember, default baud is 115200)

    -Once comms are established, program unit with new application

     

    Please let me know if this helps.

  5. Hey - thanks for the quick reply.

     

    The subroutine is running (called from main routine, no conditions).  I added the incrementers, (wich is a great idea!),  and they are working.  The Net 1 incrementer runs when power is supposed to flow, Net 2 incrementer advances at the completion of the timer cycle.  But even with the incrementer seeing a pulse in NEt 2, the timer state does not (visibly) change and the  output is not triggered.

     

    I confirmed with the increment blocks in place that the manual trigger (MB310) does in fact trigger the output and increment Net2.  It's got to be something funky with the timer....

     

    Hello Rich,

     

    Since it is a one-shot output from the timer (only on for one scan) you may not see this logic perfom while online with the PLC - it may be happening much too fast for the communciations to catch this logic.

     

    What kind of output are you triggering?  You may not be seeing anything come from the output since you are only triggering it for one scan - it may need to be on for longer to see an output.  What is this output triggering?

  6. Hello Rich,

     

    Are you sure the subroutine is running?  Is it against teh main rail in the main routine, or are there conditions for the subroutine to run?

     

    Can you place an incremeting function block at teh end of net 1 and 2 to see if they are being evaluated?  The incrementers should increment (net 1 with scan time, net 2 with timer value) if this subroutine is being called.

  7. Also, I forgot to mention, PTO is unavailable with teh snap-in modules.  However, we have created an example project that comes with VisiLogic on how to create the ladder for PTO.  (Help\Examples...\Version 900\Project Examples\HSC_HSO\V570_Stepper_Motor_PTO.vlp)

     

    The EXF-RC15 will only allow 3 PTO channels if you are performing pulse only.

     

    If you do not need PTO, you can use PWM instead of PTO to give only pulses out of the high-speed transistor outputs.  In this case, will you be able to use the configuration above that you have described.  Otherwise, you will need more modules that support PTO.

     

    Hope this helps.

  8. Hello,

     

    When you receive the string, do you convert 1 character to 1 element?  Is so, you can compare the first MI of teh buffer vector to the HEX or Decimal equivalent of an "A" (hex = 0x41, dec = 65).  Is the compare is true, trigger a bit, and on the positive transition of that bit, store the string into a separate vector.

     

    You will have to create the second vector to be the length of the maximum amount of string space you will need.

     

    Please let me know if this helps.

  9. Hello,

     

    So you know what kind of stepper motors you will be using/ how you will want to communciate to them?

     

    For six different motors, you may want to use a driver with some type of communciations (serial/ethernet/CANbus), one that has a common protocol with our products (Modbus/CANOpen/etc.).

     

    As for the DO - are you going to need transistor or relay outputs?  Would you like them on the back of the unit, or DIN rail mounted in your cabinet?

  10. Hello,

     

    Were you looking for the 2D or 3D CAD files?

     

    If you go to the technical library page on our website, under the Vision HW tab, there are the 2D and 3D CAD file tabs where we list our CAD files for our products.

  11. Writing a header upon start-up may be too quick for the PLC to write to the SD card -  I don't think it ever receives that command.

     

    We have an example of writing a header to the CSV file in the Examples of VisiLogic. (Help tab\Examples...\Version 900\Project Examples\SD\V570_buffered CSV.vlp)

     

    In this example, when we request to write a CSV line, we first write the header to the file once, then we create the data lines and write them.  This should work for you.

     

    Please let me know if I can explain anything further.

  12. Hello,

     

    You do have the CR and LF characters after the last piece of data.  If you write a second line, you should see the line be written below the first line in the TXT file.  They will not show on the TXT file since they are "invisible" characters and there is no way for the TXT file to show these characters.

     

    Please let me know if you do not find this to be the case.  Hope this helps.

  13. I just tried this but I get an error message "Application Error-if this problem continues, contact your distributor". The original works, the one in the copy folder does not.

    This is Visilogic version 9.8.2 build 0, on Windows 8.1. Any thoughts?

    Hello,

     

    If you are still having issues with your VisiLogic, please feel free to e-mail into support@unitronics.com for further assistance.

  14. Hello Peter,

     

    Unfortunately, you cannot adjust the viewing format of floats.

     

    However, you can split the float into two parts: the whole part and fractional part.  This can be done through the function block under the Math tab, in the Floats section, Convert, and the INV(A+B/n) function block.

     

    Then, on screen, you can format the MI, ML, or DW that you put the fractional part on screen and format it such that only 'x' amount of digits are shown.

     

    Hope this helps.

  15. Hello Marko,

     

    Thank you for this clarification.

     

    You simplest way would be to create schedule blocks for each lamp.  The schedule blocks are designed to only activate following elements (to the right of it) once the schedule parameters match the RTC.

     

    You may indirectly change the schedule settings, however, you would still need to create bits to activate/deactivate certain outputs after the schedule.

     

    Hope this helps.

×
×
  • Create New...