Jump to content
OMRON Forums

Ychu

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Ychu

  1. We have PowerUMAC with ACC59E option installed. This option allows me to make ADC reading manually which is what we need for our application. Can I do that with Power Clipper ADC option as well? I don't see it is mentioned in the Clipper manual. Thanks.
  2. Thanks Charles. By the way this manual has 71 pages if I am not mistaken. I just tried the code but getting the following compilation error. 'GateIOStruct' has no member named 'ConvertCode' 'GateIOStruct' has no member named 'ADCRdy' 'GateIOStruct' has no member named 'ADCs' When I looked into the header file RtGpShm.h, GateIOStruct only has three members; typedef struct GateIOStruct { unsigned DataReg[6]; unsigned IntrReg; unsigned CtrlReg; } GateIOStruct; The structure that has ConvertCode is; typedef struct ADCDemux { int Enable; int Index; unsigned ConvertCode[ADCDEMUX_SIZE]; int Address[ADCDEMUX_SIZE]; int ResultLow[ADCDEMUX_SIZE]; int ResultHigh[ADCDEMUX_SIZE]; } ADCDemux; Then it does not have ADCRdy and ADCs. Thanks.
  3. Thanks Charles. By the way this manual has 71 pages if I am not mistaken.
  4. Thanks Steve. Isn't the sample rate applicable only in automatic read mode? In manual read mode, the application function can set the convert code any time, wait for the ready-bit and then read the value. If I understand correctly the time it takes for the value to be ready will be just the A/D (chip) conversion time and maybe some small overhead. What I am looking for is the A/D conversion time, for instance the last A/D that I worked with had 17usec conversion time. Since I am going to make the reading from the ISR routine, it is important that the time to read is in the range of microseconds. Another question is I have ACC-59E and I need to set convert code, in bipolar mode, for ADC#1 as ACC59E[1].ADCs = 8. How would I do that in the 'C' routine using shared memory pointer? The SetPmacVar() method will not compile. Even if it does, I think shared memory would be much faster than SetPmacVar() call. Thanks again.
  5. I need to read ADC manually from ISR routine. Does anyone know what the ADC conversion time is? Thanks.
  6. We bought a power clipper with the PWM laser control (high speed digital output) option since it was recommended to us. Is there any application notes on how to use that laser control?
  7. Thanks Charles. No I am not using PDK but open source SSH library. I still get the error even when I launched gpascii with option -2. Any suggestion? Thanks.
  8. I am trying to read a digital I/O input from my application. I know the pointer name that is mapped to the register. For example, // set in the global definitions.pmh ptr IoCard1RegIn1->u.io:$C00000.8.8 I could just type IoCard1RegIn1 at IDE terminal but when I tried to send this same string from my application, I would get ILLEGAL PARAMETER error. Thanks.
  9. Thanks Charles. I did send my project to Delta Tau support yesterday although I am not sure if it is the cause. For now, I plan to just manually move the axis to trigger the home switch with UserAlgo.CaptCompIntr set to 1 to see if makes any difference.
  10. Thanks Charles. I did do the same as what you have shown here as they came right out of the manual. According to the response of 'ver' command, the firmware version is 2.0.2.14.
  11. Thanks Charles. At the moment, I am having trouble with the CaptCompISR() routine (see below) causing disconnect to PowerPMAC when trying to exercise with homing routine. I will continue with the laser pulsing function as soon as I get the disconnect problem resolved. void CaptCompISR(void) { volatile GateArray3 *MyGate3; // ASIC structure pointer int *CaptCounter; // Logs number of triggers int Temp; MyGate3 = GetGate3MemPtr(0); // Pointer to IC base CaptCounter = (int *)pushm + 65535; // Sys.Idata[65535] (*CaptCounter)++; // Increment counter Temp = MyGate3->Chan[0].HomeCapt; MyGate3->IntCtrl = 1; }
  12. Thanks Charles. Yes I am aware of using ISR routine which is supported only for Gate3. I do have a need for Gate2 as well but for now, I will focus on Gate3 only. When you said about using virtual motor to trigger the edges, where do I do that? Will that be in virtual motor's user-servo routine? The way I understood from the manual(s), I would setup the COMPA/COMPB value for the channel (assuming motor #3) that will generate the pulses and implement the user-servo routine for the virtual motor (motor #2) which updates the motor #3's position. Is this what you are saying? If so, the rate of motor #2's user-servo routine call will depend on the servo-period (ServoClockDiv) for the system so I am limited to that frequency. For example, my system is currently have ServoClockDiv set to ~2.25K due to the hardware (I think), which only gives me ~444us. My minimum pulse width requirement is 5usec at least to be compatible with what we have today and of course the smaller we could get the better. I need to be able to generate pulse(s) with or without moving my XYZ Stage. My understanding is I will use EQU (CompA/CompB/CompAdd) logic which will require somewhere (user-servo or user-phase routine) to update the position of the motor that is assigned to the EQU channel. Thanks.
  13. I need to generate a single pulse from EQU with a variable time. I thought I would use background real-time C program to do that because of the time I need, between 5usec to 10msec. I put together a test program, see below. My program seems to work reliably starting from ~25usec and up. The smallest pulse I could get is ~15usec but jumps around between ~15usec to ~35usec when I set my delay to below 25usec. Below is the sample of my code; #define EQUWRITE_1 0xC0 #define EQUWRITE_0 0x40 int main(void) { struct sched_param param; volatile GateArray3 *Gate3IC; struct timespec sleeptime = {0}; param.__sched_priority = 50; pthread_setschedparam(pthread_self(), SCHED_FIFO, &param); InitLibrary(); Gate3IC = GetGate3MemPtr(0); sleeptime.tv_nsec = 10000; // 10usec Gate3IC->Chan[chanIdx].OutCtrl = Gate3IC->Chan[chanIdx].OutCtrl | EQUWRITE_1; // set EQU state to 1 nanosleep(&sleeptime, NULL); Gate3IC->Chan[chanIdx].OutCtrl = Gate3IC->Chan[chanIdx].OutCtrl & ~EQUWRITE_1; Gate3IC->Chan[chanIdx].OutCtrl = Gate3IC->Chan[chanIdx].OutCtrl | EQUWRITE_0; // set EQU state to 0 CloseLibrary(); return 0; } I did not try changing the sched_priority value as I am not sure if it is okay to go below 50 (that I got from Delta Tau IDE sample code). What is the best 'time' resolution I could get from this background program? Is there any other way besides using this technique to accomplish what I need?
×
×
  • Create New...