Jump to content
OMRON Forums

tweekzilla

Members
  • Posts

    38
  • Joined

  • Last visited

tweekzilla's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator Rare
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hi, I'm trying to extract the coordinate system parameter ProgRunning from a C program. I almost get it to work with the following code, except that the enum returned is either 0 or 1 - It does not for example return 2 if I engage a limit switch I've posted the enum definition here for clarity: enum progstatus {PROG_RUNNING, PROG_STOP_ON_PAUSE_STEP, PROG_STOP_ON_LIMIT, PROG_STOP_ON_BKPT, PROG_STOP_CODE_ERR, PROG_STOP_STACK_ERR, PROG_STOP_LVAR_STACK_ERR, PROG_STOP_CALL_ERR, PROG_STOP_AXIS_ASSIGN_ERR, PROG_STOP_KINEMATICS_ERR, PROG_NOT_IN_USE = 16}; And my code: #include // Global Gp Shared memory pointer #include "../../Include/pp_proj.h" #include static volatile GateArray3 *TickGate3IC; //ASIC structure pointer int main(void) { enum progstatus pp; int coor_status; InitLibrary(); pp = CoordStatus(1); printf("%d\n", (int)pp); CloseLibrary(); return -1; }
  2. Hi All, If I edit motion control program on the pmac (/var/ftp/userflash/Project/PMAC..../Motion.../proc2.pmc) and then run the program from the webgui - (&1b2r) it doesn't seem to reflect any of the edits I made to the file. Do I need to somehow reload/compile the programs after editing them?
  3. Reading the manual I don't think this is possible but I would like to be able to read the Pfm value that is pointed to by Motor[x].pDac - i.e. I don't want to have to keep a record of which motor is pointed to which hardware channel (hence the pointer in the first place). If I try and read the value via: int *temp; temp = pshm->Motor[1].pDac; printf("%i", *temp); My code just quits - no error no nothing. The problem is when you try and get the value from temp - i.e the printf statement. Reading the Pfm directly from the channel works fine. Is it possible to do this or would I need to keep a separate lookup for my C programs between motors and channels
  4. Is there a solution yet to the windows 8 issue - I have a standard US version and it also hangs at compile options - Language settings is English
  5. Fixed - User error - Issue with the plcs I was running
  6. I'm putting together a cabinet design and I was wondering if there are any solidworks models available for the modular rack system and boards?
  7. I just started to use the digital amplifier board for pulse and direction. There was no signal being produced on on the D output (with the usual setting for pulse and direction output). I then went to the PMAC system setup and Enabled the output on Acc24E3[0].Chan[0] and moved the PWM sliders around. There was no output as seen on an oscilloscope for either top/bottom A-D. The only output that appeared to be working was the PHACLK, ADCCLK and ADCSTB. Am I missing something obvious or is this a sign of a broken board?
  8. Some more information - Our current setup uses a 300hz Xenomai thread to log pmac variables into a posix message queue. A 10hz Xenomai thread then sends that data over the network and receives new position information from the control computer. The idea is that this thread then puts the new positions into the Rotary Buffer - the whole transaction is psudo deterministic with error checking etc. This gets really ugly if we have to open a telnet session in a xeonmai thread, log in, run gpascii and set things up. Ideally would be able to append the new positions directly from the C-code as they come in to the memory location of the next buffer command. An alternative would be if we could connect to a port on the PMACSERVER and send commands that way. This would be somewhat cleaner from a C-thread.
  9. Just to update on this - The following works fine (along with an expected lag due to the lookahead), unless you make P12=P13 then it will get stuck in a loop - i.e. setting P12 != P13 after setting P12=P13 does not execute the move. You also cannot exit the loop by setting P10 = 0. Maybe this is expected? open prog 3 dwell 0 EncTable[3].type = 10; //setup for trigger; EncTable[3].pEnc1 = Acc24E3[1].Chan[2].Status.a; //point to arming flag linear; X0 F180; while(P10 != 0) { X(P12) F100; x(P13) F50; } X1000 F100; close
  10. I'd like to be able to pass new position (and feed-rates) to a motion control program via P variables - The code below does indeed see the P-variables at startup but does not recheck the values whilst running. Is it possible to do the following? open prog 3 dwell 0 EncTable[3].type = 10; //setup for trigger; EncTable[3].pEnc1 = Acc24E3[1].Chan[2].Status.a; //point to arming flag linear; X0 F180; while(P0 != 0) { X(P1) F100; } X1000 F100; close
  11. Bump... This would be a very useful feature for our application.
  12. I have a TCP server that currently transmits various status/Positions etc on a deterministic basis (xenomai user-space task) to a python client. I would like to be able to use the same socket to transmit from the python client to the PMAC updated positions in a rotary buffer. Is there a way in a C program to add commands to the Rotary buffer?
  13. As an update I can confirm that the following works ok but as soon as you try and address the P variable the ISR hangs void CaptCompISR (void) { volatile GateArray3 *TickGate3IC; //ASIC structure pointer int *CaptCounter; //Logs number of ticks int *CaptPosStore; //Storage pointer TickGate3IC = GetGate3MemPtr(1); //Pointer to IC base CaptCounter = (int *)pushm + 0; // Sys.Idata[0] CaptPosStore = (int *)pushm + 1; (*CaptCounter)++; //Increment Counter *CaptPosStore = TickGate3IC->Chan[2].HomeCapt; //pshm->P[1]++; //This is the thing that crashes!!! TickGate3IC->IntCtrl = 0x04; //Clear interrupt }
×
×
  • Create New...